From b653b2fb6434e6c99ffe2186469a0d4d01b1fdea Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 9 Mar 2011 18:29:10 -0800 Subject: [PATCH] Update TinyMCE plugin for reusable thingies; doesn't quite arrange properly in the layout, we'll have to figure that out still. --- plugins/TinyMCE/TinyMCEPlugin.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/plugins/TinyMCE/TinyMCEPlugin.php b/plugins/TinyMCE/TinyMCEPlugin.php index 49bbdf90db..4051ff59ee 100644 --- a/plugins/TinyMCE/TinyMCEPlugin.php +++ b/plugins/TinyMCE/TinyMCEPlugin.php @@ -290,9 +290,14 @@ class TinyMCEPlugin extends Plugin // our AJAX form submission. Manually moving it to trigger // on our send button click. $scr = <<'); - $('#notice_action-submit').click(function() { + form.find('.submit:first').click(function() { tinymce.triggerSave(); }); @@ -319,14 +324,15 @@ class TinyMCEPlugin extends Plugin SN.U.Counter(noticeForm); }); - $('#'+SN.C.S.NoticeDataAttach).change(function() { + form.find('input[type=file]').change(function() { var img = ''; var html = tinyMCE.activeEditor.getContent(); ed.setContent(html + img); }); } }); - }); + }; + })(); END_OF_SCRIPT; return $scr; -- 2.39.5