From 78eb6dc42e73551c2bb9972e53a2d7dd3b81e7d7 Mon Sep 17 00:00:00 2001 From: CruiseDevice Date: Thu, 1 Oct 2020 14:59:18 +0530 Subject: Add tinymce to forum --- yaksh/static/yaksh/js/show_toc.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'yaksh/static') diff --git a/yaksh/static/yaksh/js/show_toc.js b/yaksh/static/yaksh/js/show_toc.js index b628eaa..7d9b68e 100644 --- a/yaksh/static/yaksh/js/show_toc.js +++ b/yaksh/static/yaksh/js/show_toc.js @@ -2,6 +2,24 @@ $(document).ready(function() { $('#sidebarCollapse').on('click', function () { $('#sidebar').toggleClass('active'); }); + + $(document).ready(() => { + $(function() { + tinymce.init({ + selector: 'textarea#id_description', + setup : function(ed) { + ed.on('change', function(e) { + tinymce.triggerSave(); + }); + }, + max_height: 400, + height: 400, + plugins: "image code link", + convert_urls: false + }); + }); + }); + player = new Plyr('#player'); var totalSeconds; store_video_time(contents_by_time); -- cgit