dankito / RichTextEditor

Rich text WYSIWYG editor for Android and JavaFX
Apache License 2.0
92 stars 36 forks source link

how to remove some of the tool bar options and make the tool bar #17

Closed kunz398 closed 5 years ago

kunz398 commented 5 years ago

How do i remove some of the tool bar options lets say for example i want to remove search or bold

dankito commented 5 years ago

You're right, currently there's no way of removing a command from toolbar.

In the upcoming major release (3.0.0) I will add a removeCommand() method to EditorToolbar.

In the meantime I suggest creating your own toolbar to fit the displayed commands to your needs.

For an example see section 'Create custom editor toolbar' in README (currently only on develop branch).

dankito commented 5 years ago

I added removeCommand() and removeSearchView() to EditorToolbar and just pushed version 2.0.8 to Maven Central (will be visible to public in approximately two hours).

You can use it like this:

toolbar.removeCommand(CommandName.BOLD);

toolbar.removeSearchView();

Does this fit your needs?

kunz398 commented 5 years ago

yes thank you :)