Topic: MDB5 Wysiwyg toolbars (List of toolbar buttons that can be disabled)
harland free asked 1 year ago
Hi,
In MDB5 Angular WYSIWYG, the below code for disabling a few toolbar buttons work:
disableToolbarOptions: MdbWysiwygToolbarOptions = { formatting: { hidden: true, }, align: { hidden: true, }, lists: { disabled: false, hidden: false, insertUnorderedList: { hidden: true }, indent: { disabled: true }, }, showCode: { disabled: true }, };
I need a full list of toolbar buttons that can be hidden or disabled, for example the imageURL is something that I would like to hide.
The API documentation is only for display text not for disabling/hiding toolbar buttons. Thanks would appreciate any help.
harland free answered 1 year ago
Thanks for the code, I tried but it works for some controls only. The insert link does not work even though both disable and hidden are false. I even enabled all the toolbars but the insert link, text style, insert image url and color do not work at all as opposed to what you have in the documentation.
My code when using it.
<mdb-form-control>
<mdb-wysiwyg [toolbarOptions]="disableToolbarOptions" formControlName="description" id="description"></mdb-wysiwyg>
</mdb-form-control>
I think all the dropdowns do not work only the buttons work. Also indentation works but it does not work in displaying. I am just using a simple innerHtml
when displaying the html.
Could you shed some light why this is happening?
Arkadiusz Idzikowski staff answered 1 year ago
I already answered in this thread: https://mdbootstrap.com/support/angular/mdbwysiwygcomponent-insert-chip-buttons-from-custom-dropdown/
harland free commented 1 year ago
Oh, I just saw your latest comment. Ok thanks for that! Let me know when you updated the API doc.
harland free commented 1 year ago
Apart from the above post I did, I am getting an error when clicking on dropdown i.e. text style, insert link, insert image, color. I saw in one post that i had to import wysiwyg scss under style.scss. I did that but did not help. Below is the error.
Error: Host already has a portal attached at throwPortalAlreadyAttachedError (portal.mjs:24:11) at DomPortalOutlet.attach (portal.mjs:186:17) at OverlayRef.attach (overlay.mjs:880:49) at mdb-angular-ui-kit-tooltip.mjs:184:49 at timer (zone.js:2405:41) at _ZoneDelegate.invokeTask (zone.js:406:31) at core.mjs:23896:55 at AsyncStackTaggingZoneSpec.onInvokeTask (core.mjs:23896:36) at _ZoneDelegate.invokeTask (zone.js:405:60) at Object.onInvokeTask (core.mjs:24197:33)
Rafał Seifert free commented 1 year ago
It's quite hard to reproduce but we've managed to. We will have to look into this problem as it may be linked to other components. Does this error blocks/stops you app from working?
harland free commented 1 year ago
I hid all the dropdowns for now, but I cannot wait for long (next update). Hopefully there is a quick fix if all possible.
harland free commented 1 year ago
Hi @Rafal Seifert, Is there any ETA as to when the fix is going to be done? I am also unable to set the height of the textarea.
Arkadiusz Idzikowski staff commented 1 year ago
We will try to add a fix in the next update (which should be available in about two weeks) but we can't promise that yet. We still need some time to find a good solution for this problem.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Free
- Premium support: No
- Technology: MDB Standard
- MDB Version: MDB5 4.4.0
- Device: Macbook
- Browser: Chrome
- OS: MacOS
- Provided sample code: No
- Provided link: No