MyBB Community Forums

Full Version: Add Spoiler Button to CKEditor
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello all, I decided to download the CKEditor plugin by ATofighi, installed it, and it works perfectly--so far, I haven't used every single button on there yet.

However, I really would like to have a spoiler button in there as well. One that uses the tags [spoiler=spoiler title]spoiler text[/spoiler]. I downloaded this plugin, read through ATofighi's CKEditor thread, and read through a short guide on installing an additional plugin to the CKeditor on the CKeditor website.

Pretty much what I got from that (I'm not very html savvy) is to insert the relevant "spoiler" folder into /inc/jscripts/ckeditor/plugins, and the files in the "include" folder into /inc/jscripts/ckeditor, which I did. Also to edit the file /inc/jscripts/ckeditor/config.js, inserting the text:
config.extraPlugins = 'spoiler'
I did that, though I don't know exactly where to put it. I also added 'Spoiler' to the config.toolbar right below, but it only made it so that the editor doesn't appear at all! Is there a solution to this that would allow me to include a spoiler button on the ckeditor?

Also, I've heard there have been troubles including additional buttons aside from just one, which would be a future problem since I'm planning on including options like glowtext. So is there a solution to that too that I don't know about?

Thank you for any answers you provide.

Edit: Uninstalled the editor and decided to use Rin Editor instead for the ease of adding buttons. However, the problem still stands. Put the spoiler folder into the plugins and added a.extraPlugins='spoiler' to the config.js file with no change.
Sorry for the double post but I figured since my question changed it was a good reason to bump this topic.

Decided to use Sephiroth's Spoiler MyCode which works well with the Rin Editor. But now I have a new question. Where do I integrate the CSS for it? It says here that you need to add in CSS for each theme you have, but where exactly do I add it? Which template?

I still would like to know how to add the coding for a button into an editor, but I asked that question directly in the Rin editor thread, so hopefully it gets answered there.