#[1]gnikyt feed [2]gnikyt Code ramblings. Toggling TinyMCE v4 /* Dec 06, 2016 — 847B */ Here’s an easy way to turn on and off the TinyMCE editor for version 4. document.getElementById('toggle-tinymce').addEventListener('click', function(e) { e.preventDefault(); var editorID = this.dataset.editorId; var editor = tinymce.EditorManager.get(editorID); if (editor) { editor.remove(); } else { editor = tinymce.EditorManager.createEditor(editorID, tinyMCE.settings); editor.render(); } }); You simply then need to create a link or button as such: Toggle That’s it. It will remove the TinyMCE if enabled, and if not, it will re-render by re-creating the editor with settings provided by tinyMCE.settings. [3]MD | [4]TXT | [5]CC-4.0 This post is 8 years old and may contain outdated information. __________________________________________________________________ [6]Ty King Ty King A self-taught, seasoned, and versatile developer from Newfoundland. Crafting innovative solutions with care and expertise. See more [7]about me. [8]Github [9]LinkedIn [10]CV [11]RSS * * * * * * * * * * References Visible links: 1. /rss.xml 2. / 3. /toggling-tinymce-v4/index.md 4. /toggling-tinymce-v4/index.txt 5. https://creativecommons.org/licenses/by/4.0/ 6. /about 7. /about 8. https://github.com/gnikyt 9. https://linkedin.com/in/gnikyt 10. /assets/files/cv.pdf 11. /rss.xml Hidden links: 13. localhost/tmp/lynxXXXX8frWk5/L766772-5418TMP.html#cb1-1 14. localhost/tmp/lynxXXXX8frWk5/L766772-5418TMP.html#cb1-2 15. localhost/tmp/lynxXXXX8frWk5/L766772-5418TMP.html#cb1-3 16. localhost/tmp/lynxXXXX8frWk5/L766772-5418TMP.html#cb1-4 17. localhost/tmp/lynxXXXX8frWk5/L766772-5418TMP.html#cb1-5 18. localhost/tmp/lynxXXXX8frWk5/L766772-5418TMP.html#cb1-6 19. localhost/tmp/lynxXXXX8frWk5/L766772-5418TMP.html#cb1-7 20. localhost/tmp/lynxXXXX8frWk5/L766772-5418TMP.html#cb1-8 21. localhost/tmp/lynxXXXX8frWk5/L766772-5418TMP.html#cb1-9 22. localhost/tmp/lynxXXXX8frWk5/L766772-5418TMP.html#cb1-10 23. localhost/tmp/lynxXXXX8frWk5/L766772-5418TMP.html#cb1-11 24. localhost/tmp/lynxXXXX8frWk5/L766772-5418TMP.html#cb1-12 25. localhost/tmp/lynxXXXX8frWk5/L766772-5418TMP.html#cb1-13 26. localhost/tmp/lynxXXXX8frWk5/L766772-5418TMP.html#cb2-1