Skip to content

RichEditor props passing #263

Description

@Ducica

Is your feature request related to a problem? Please describe.

The rich editor component, is not accepting "rest" props. (

export class RichEditor extends Component {
)
Meaning it is possible only to send specific props to the Editor from tinymce itself

const { id, initialValue, disabled, minHeight, onBlur, onChange, onFocus, editorConfig, inputValue, onEditorChange, } = this.props;

Ideally it should be like this
const { id, initialValue, disabled, minHeight, onBlur, onChange, onFocus, editorConfig, inputValue, onEditorChange, ...rest } = this.props;

`initialValue={initialValue}
value={inputValue}
init={config}
id={id}
disabled={disabled}
onBlur={onBlur}
onFocus={onFocus}
onChange={onChange}
onEditorChange={onEditorChange}
{...rest}

`
This can be helpful in various situations. Currently, we are working on our timeline feed, and I would like to register onKeyDown event, which would basically automatically trigger submit/edit of the comment, but it is not possible to do in current implementation unfortunately. I think this would be probably beneficial for RDM as well (that after typing you can just hit enter and send/edit the comment). Please let me know what you think. If there is no capacity on your end, I could make a PR.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions