Spoiler Plugin for TinyMCE 4

 Feb. 11, 2016     0 comments

I'm still polishing this blog CMS. One of the major "under the hood" improvements that I've made recently is the upgrade of TinyMCE content editor from v.3 to v.4. For that I've done a major rework of django-tinymce4 package and fixed almost all features, including spellchecker and integration with django-filebrowserdjango-filebrowser-no-grappelli packages. I'm going to submit a pull request with my changes, but that will be later, when I get all things in order, including updated documentation for django-tinymce4.

As a part of this improvement I've developed a spoiler plugin for TinyMCE 4 that allows to add spoiler blocks to authored text, that is blocks of text that are initially collapsed and can be expanded by mouse click. An example of such block is below.

 Click to show
This is a block of hidden text.

 This is how it looks in TinyMCE 4 editor:

Naturally, for spoiler blocks to work properly you need to add the the necessary CSS/JavaScript code to your website.

You can find this spoiler plugin in my GitHub repository. Feel free to use it as you like.

  HTMLJavaScriptPluginTinyMCE