Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I read this on your homepage:
http://ufku.com/drupal/bueditor/contributions/class-library
I know how i can add dropdowns with markup that will be inserted:
js: E.tagChooser([
['span', 'Blue', {'class': 'blue-text'}]
]);
I am not sure how i can add this t oa dropdown
E.toggleClass('error', 'div');
Another idea that i had was to make a dropdown with some "html templates". Like when i click it it adds som html structure to the textarea.
An example would be much appreciated.
thanks.
Comments
Comment #1
marcoka CreditAttribution: marcoka commenteddid some experiments, one solution i found for having some kind of class-library-dropdown
Comment #2
ufku CreditAttribution: ufku commentedYou can also use E.tagChooser as the popup generator and then alter the links in it.
Comment #3
marcoka CreditAttribution: marcoka commentedok that works. i kind have another problem. when i only want to add some code when clicking a button in the dropdown.
Lets say if i click the button "template1" in the dropdown i want the following to be inserted:
i came up with
Comment #4
marcoka CreditAttribution: marcoka commentedComment #5.0
(not verified) CreditAttribution: commented.