Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RichEditor props passing #263

Open
Ducica opened this issue Nov 22, 2024 · 0 comments
Open

RichEditor props passing #263

Ducica opened this issue Nov 22, 2024 · 0 comments

Comments

@Ducica
Copy link
Contributor

Ducica commented Nov 22, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant