Topic: MdbWysiwygComponent insert chip buttons from custom dropdown
sistemiUCSC pro premium priority asked a year ago
Expected behavior
I need to have a dropdown, populated with custom data on the toolbar of MdbWysiwygComponent.
Selecting a value from this dropdown i need a button should be insert on the actual position of the caret.
There is a way to add custom dropdown in toolbar?
There is a way to dinamically add buttons inside editor text?
Actual behavior
Resources (screenshots, code snippets etc.)
Arkadiusz Idzikowski staff answered a year ago
You can customize text or value in existing dropdowns/buttons or hide/disable specific toolbar sections, but it is not possible to add a completely new custom element.
You can use [value]
input to dynamically add custom content that will be displayed as editor text. We explain how to do that in the plugin documentation: https://mdbootstrap.com/docs/angular/plugins/wysiwyg-editor/#section-basic-example
harland commented a year ago
Hi,
In MDB5 Angular WYSIWYG, the below code for disabling a few toolbar buttons work, it's in the same link you posted:
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.
Arkadiusz Idzikowski staff commented a year ago
To hide or disable imageURL
you would need to use this configuration:
links: {
image: { hidden: false },
}
We will update the API page to include all the toolbar options. For now, you can check available options by importing the MdbWysiwygToolbarOptions
type.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: Yes
- Technology: MDB Angular
- MDB Version: MDB5 4.0.0
- Device: desktop
- Browser: chrome
- OS: windows
- Provided sample code: No
- Provided link: No