Button visibility
Hi, I'm using your component on my new web site. Really compliments for your work. Could be nice to have a configuration to show/hide the tool-bar buttons (a boolean with true as default for each of the item of the tool-bar).
At the momet I'm disabling them with the css like (where "blog" is the id of the controller
#strikeThrough-blog,
#subscript-blog,
#superscript-blog,
#customClassSelector-blog {
display: none;
}
Thanks for your feedback, I'll have to think whether it will be convenient to implement.
@empystudio Thanks for recipe. However i cannot hide "insert image" button, because it not have an id. Any ideas?
@empystudio Thanks for recipe. However i cannot hide "insert image" button, because it not have an id. Any ideas?
I am doing this way and is working:
In html file put any id to the component editor, for example "myEditor"
<angular-editor id="myEditor"
In Css file put the code below:
:host /deep/ angular-editor#myEditor .angular-editor-button[title="Insert Image"]{ display: none }
If you want remove others buttons, just copy and paste the code and change the title.
Will be useful if the toolbar can be passed as a child of the angular-editor. The actual angular-editor-toolbar can be used as the default toolbar and will have properties to disable the toolbar actions.
For example:
` <angular-editor ...> <angular-editor-toolbar ... [disableBold]={true}
`
@Aleksluciano It seems not working in Angular8 : :host ::deep angular-editor#myEditor .angular-editor-button[title="Insert Image"]{ display: none }
@SerenaIce each control has a unique ID which is suffixed with the id of the angular-editor component.
<angular-editor id="editor"></angular-editor>
#backgroundColorPicker-editor,
#foregroundColorPicker-editor,
#insertVideo-editor,
#insertHorizontalRule-editor,
#clearFormatting-editor,
#indent-editor,
#outdent-editor {
display: none;
}