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.
Simple question. I need to create a button to wrap the selected text with [collapsed] and [/collapsed] tags for use with the Collapse Text module.
Is there some way to duplicate a button like <strong>
with my own custom code?
Comment | File | Size | Author |
---|---|---|---|
#2 | collapsibleblock.zip | 50.49 KB | finedesign |
Comments
Comment #1
dczepierga CreditAttribution: dczepierga commentedU can download one of the similar plugins from here:
http://ckeditor.com/addon/blockquote
U can modify it and paste to "plugins" directory in ckeditor module (or custom plugins direcotry if u configure it) and after that u can enable it in the CKEditor profile in "Plugins" - remember also to add this button to toolbar.
Greetings
Comment #2
finedesign CreditAttribution: finedesign commentedThank you.
I made an attempt to quickly customize it, but am having a hard time loading it into the input filter.
At admin/config/content/ckeditor/edit/Full I enabled the Plugins checkbox for "Plugin file: collapsibleblock"
However, I do not see the custom icon show up. I have tried clearing caches.
Can you try it out? I have it attached.
Comment #3
sashkernel CreditAttribution: sashkernel commentedDid you get this working?
Comment #4
finedesign CreditAttribution: finedesign commentedNot only have I NOT gotten this to work, but I am having a terrible time with collapsible block messing up CKeditor by making it go blank when the page loads. I always have to switch the editor to "Filtered HTML" then back to "Full HTML."
Comment #5
sashkernel CreditAttribution: sashkernel commentedYeh, I also get pile of errors when using collapsed="collapsed" or class within the tag.
I also found this way of creating collapsible text ind drupal 7 (http://drupaleasy.com/quicktips/create-collapsible-jquery-boxes-drupal), but not sure how to include *.js file in the body of the content.
Comment #5.0
sashkernel CreditAttribution: sashkernel commentedneed to comment the code