Configuring toolbar
Thanks for the hard work, this library save my times alot. Btw, is the toolbar content configurable? I want to only use some of them
Regards
Hi! Not yet... What do you want to configure?
Hello,
I am writing here, but if you want to show less tools, as this is not possible through the configuration, you can use a CSS in order to hide unwanted tools:
HTML:
<app-text-editor [parent]="experienceItem" [teFormControlName]="'projects'" [height]="'7rem'" [placeholder]="'Enter projects here...'" class="te-basic-tools"></app-text-editor>
Note that I am using a CSS class te-basic-tools which I am using to cascade and to hide some of the tools that I don't need to show.
And CSS:
.te-basic-tools .angular-editor-button[title="Subscript"],
.te-basic-tools .angular-editor-button[title="Superscript"],
.te-basic-tools .angular-editor-button[title="Text Color"] {
display: none;
}
This will cascade through the te-basic-tools CSS class and will hide the targeted tools. Note, that I am using a property selector that matches the button title attribute:
<button _ngcontent-c2="" class="angular-editor-button" title="Subscript" type="button" id="subscript-"><i _ngcontent-c2="" class="fa fa-subscript"></i></button>
Using the approach above, I was able to set up an editor with a few basic options.
Hi, melhaer...
Very smart solution, thanks
Btw @melhaer, unfortunately we can't set style to child component from it's parent
.angular-editor-button is in angular-editor-toolbar, so we can't apply style to it. Was it working on your project?
Hello, it still works on my side. Check the image attached, where I underlined the Subscript button, which you can see is missing visually in the Editor, because I set display: none through the CSS using its title property.

This is the way you are hiding a single button.
You can also hide a whole set of tools, using something like that:
#angularEditor .angular-editor-toolbar-set:nth-child(6)
This will hide the sixth set of tools. I think that you need to check if #angularEditor id different on your side and use it to cascade though it. I used it in order to override some editor styles.
Btw @melhaer, unfortunately we can't set style to child component from it's parent
.angular-editor-button is in angular-editor-toolbar, so we can't apply style to it. Was it working on your project?
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.
Bump. I would also like to see this implemented. A code configurable solution would be ideal rather than hiding with CSS. Perhaps a config property that on a null value displays the default or full set of buttons OR pass in an object listing of buttons with boolean values?
Thank you very much! Yes, we need to think about a convenient configuration. Maybe config would be right decision.
+1
If you are using sass you can hide the image upload button, or any button really using:
/deep/ .angular-editor-button[title="Insert Image"]
display: none
Hi @kolkov
Thank you for the great text editor.
I see that there is a config for 'showToolbar' but I'm struggling to get it to toggle boolean values.
I have a button which calls the following method:
hideToolbar() { this.config.showToolbar = false; }
All seems well but it does not change anything, I'm fairly new to development so your help would be appreciated!
Hi Kolkov,
Thanks for the component, I have a requirement wherein I have to add line breaks and insert tables. Do you have any plans to include these features?
Thanks again!
Hi! @christane I think that we can add such functionality, but make it customizable.
Bump. I would also like to see this implemented. A code configurable solution would be ideal rather than hiding with CSS. Perhaps a config property that on a null value displays the default or full set of buttons OR pass in an object listing of buttons with boolean values?
Is there a code solution to this yet?
This editor is really well
any luck with this issue? passing the array of strings still does not work.
I see 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;
}
Hi, Actually I need to upload images to editor (internal application images) for that I need to add custom button by clicking that button we can get the required images to upload.
How can I add custom button to editor ?
@Bhanu1225 did you get you solution?
Hi, I doesn't want the font tag <font> to be in the HTML that gets generated while I type inside the editor. Is there a way to suppress the generation of that font tag instead which a <p> in its place will be enough. I actually use a parser to convert this HTML into a markdown so that parser doesn't support font tag. So, I want it to suppressed in the editor itself.
Eg: <p><font face="Times New Roman" size="3"><b>hello</b></font></p>
Which needs to be generated like the following
<p><b>hello</b></p>
I face an issue with angular editor (HTML code) functionality. All html tags are working fine and getting tag as output. But for iframe tag, it's not working. I have a project dependency to include iframe embed code from Youtube.
I have put new issue in github.
https://github.com/kolkov/angular-editor/issues/298
Could anyone please suggest/advise ?