Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: MdbWysiwygComponent insert chip buttons from custom dropdown

sistemiUCSC priority asked 1 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.) enter image description here



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 free commented 1 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 1 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.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Priority
  • 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