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?

CommentFileSizeAuthor
#2 collapsibleblock.zip50.49 KBfinedesign
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dczepierga’s picture

U 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

finedesign’s picture

FileSize
50.49 KB

Thank 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.

sashkernel’s picture

Did you get this working?

finedesign’s picture

Not 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."

sashkernel’s picture

Yeh, 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.

sashkernel’s picture

Issue summary: View changes

need to comment the code