angular-editor icon indicating copy to clipboard operation
angular-editor copied to clipboard

Button visibility

Open empystudio opened this issue 8 years ago • 6 comments

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;
}

empystudio avatar Jul 28 '18 10:07 empystudio

Thanks for your feedback, I'll have to think whether it will be convenient to implement.

kolkov avatar Jul 31 '18 10:07 kolkov

@empystudio Thanks for recipe. However i cannot hide "insert image" button, because it not have an id. Any ideas?

pereslava avatar Nov 08 '18 11:11 pereslava

@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.

Aleksluciano avatar Nov 15 '18 08:11 Aleksluciano

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}

`

alfredosalzillo avatar Aug 05 '19 14:08 alfredosalzillo

@Aleksluciano It seems not working in Angular8 : :host ::deep angular-editor#myEditor .angular-editor-button[title="Insert Image"]{ display: none }

SerenaIce avatar Nov 04 '19 08:11 SerenaIce

@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;
  }

talentedaamer avatar Feb 19 '20 16:02 talentedaamer