]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - plugins/Blog/blog.js
Merge branch 'master' into social-master
[quix0rs-gnu-social.git] / plugins / Blog / blog.js
1 (function() {
2     var origInit = SN.Init.NoticeFormSetup;
3     SN.Init.NoticeFormSetup = function(form) {
4         origInit(form);
5         var content = form.find("#blog-entry-content");
6         if (content.length > 0) {
7             content.tinymce({
8                 script_url : window._tinymce_path,
9                 // General options
10                 theme : "advanced",
11                 plugins : "paste,fullscreen,autoresize,autolink,inlinepopups,tabfocus",
12                 theme_advanced_buttons1 : "bold,italic,strikethrough,|,undo,redo,|,link,unlink,image",
13                 theme_advanced_buttons2 : "",
14                 theme_advanced_buttons3 : "",
15                 add_form_submit_trigger : false,
16                 theme_advanced_resizing : true,
17                 tabfocus_elements: ":prev,:next",
18                 setup: function(ed) {
19
20                     form.find('.submit:first').click(function() {
21                         tinymce.triggerSave();
22                     });
23
24                     form.find('input[type=file]').change(function() {
25                         var img = '<img src="'+window._tinymce_placeholder+'" class="placeholder" width="320" height="240">';
26                         var html = tinyMCE.activeEditor.getContent();
27                         ed.setContent(html + img);
28                     });
29                 }
30             });
31         }
32     };
33 })();