React-draft-wysiwyg: Impossible to hide / reorder options from toolbar

Created on 7 Jan 2020  路  9Comments  路  Source: jpuri/react-draft-wysiwyg

Good day,

It seems impossible to hide / re-order the options in the toolbar. I have tried to re-create example 10 (https://jpuri.github.io/react-draft-wysiwyg/#/demo), but the full set of options still show.

<Editor wrapperClassName="demo-wrapper" editorClassName="demo-editor" toolbar={{ inline: { inDropdown: true }, list: { inDropdown: true }, textAlign: { inDropdown: true }, link: { inDropdown: true }, history: { inDropdown: true } }} />

Schermafbeelding 2020-01-07 om 21 22 59

Maybe I miss something, but there seems to be no way to customise the options. I could hide options through CSS, but that does not solve the re-order problem.

Thank you.

Most helpful comment

Plz do not use latest version 1.14.3, I will soon fix this issue.

All 9 comments

I have the same problem. I try to only show certain toolbar options but its showing everything.

<Editor
        editorState={editorState}
        onEditorStateChange={e => setEditorState(e)}
        toolbar={{
          options: ["fontSize", "inline", "list", "history"],
          fontSize: {
            options: [16, 18, 22, 26, 30]
          },
          inline: {
            options: ["bold", "italic", "underline", "strikethrough"]
          }
        }}
/>

I have the same problem in version 1.14.3. After editor is focused, full toolbar appears. In version 1.13.2 everything works correctly.

It looks like the issue happens only in controlled editor

Plz do not use latest version 1.14.3, I will soon fix this issue.

Awesome @nlopin. Now we wait until your updates gets merged in the master?
Thanks again.

See issue #911

@NatasXWY my PR fixes both issues.

@jpuri could you take a look at my PR? looks like a lot of people have troubles with the current version

[email protected] has the fix for issue.

Schermafbeelding 2020-01-13 om 09 22 42

Same code, after the update. Thanks guys.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rajasekar-ideas2it picture rajasekar-ideas2it  路  4Comments

trongbang86 picture trongbang86  路  3Comments

kcabading picture kcabading  路  3Comments

ananddodia picture ananddodia  路  4Comments

gyarasu picture gyarasu  路  4Comments