lang = $editorlanguage; $directionality = get_string('thisdirection'); $courseid = optional_param('course'); $tinyroot = $CFG->httpswwwroot; echo " tinyMCE.init({ mode: \"textareas\", relative_urls: false, editor_selector: \"form-textarea-simple\", theme: \"simple\", apply_source_formatting: true, remove_script_host: false, entity_encoding: \"raw\", language: \"$editorlanguage\", directionality: \"$directionality\", plugins: \"spellchecker,emotions,paste,directionality,contextmenu\", content_css : \"{$CFG->httpswwwroot}/lib/editor/tinymce/moodlecontent.css\", spellchecker_languages : \"+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv\", spellchecker_rpc_url : \"{$CFG->httpswwwroot}/lib/editor/tinymce/jscripts/tiny_mce/plugins/spellchecker/rpc.php\" }); tinyMCE.init({ mode: \"textareas\", relative_urls: false, editor_selector: \"form-textarea-advanced\", theme : \"advanced\", skin: \"o2k7\",skin_variant: \"silver\", forced_root_block : false, apply_source_formatting: true, remove_script_host: false, entity_encoding: \"raw\", content_css : \"{$CFG->httpswwwroot}/lib/editor/tinymce/moodlecontent.css\", language: \"$editorlanguage\", directionality: \"$directionality\", plugins: \"advimage,media,safari,table,style,layer,advhr,advlink,emotions,inlinepopups,searchreplace,paste,directionality,fullscreen,nonbreaking,contextmenu,insertdatetime,save,iespell,preview,print,noneditable,visualchars,xhtmlxtras,template,pagebreak,spellchecker,moodleimage\", spellchecker_languages : \"+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv\", spellchecker_rpc_url : \"{$CFG->httpswwwroot}/lib/editor/tinymce/jscripts/tiny_mce/plugins/spellchecker/rpc.php\", theme_advanced_font_sizes: \"1,2,3,4,5,6,7\", theme_advanced_layout_manager: \"SimpleLayout\", theme_advanced_toolbar_align : \"left\", theme_advanced_buttons1: \"fontselect,fontsizeselect,formatselect,styleselect\", theme_advanced_buttons1_add: \"|,undo,redo,|,search,replace,code,fullscreen\", theme_advanced_buttons2: \"bold,italic,underline,strikethrough,sub,sup,|,justifyleft,justifycenter,justifyright,justifyfull,|,cite,abbr,acronym\", theme_advanced_buttons2_add: \"|,selectall,cleanup,removeformat,pastetext,pasteword,|,forecolor,backcolor,|,ltr,rtl\", theme_advanced_buttons3 : \"bullist,numlist,outdent,indent,|,link,unlink,anchor,|,image,media,emotions,advhr,nonbreaking,charmap\", theme_advanced_buttons3_add : \"table,tablecontrols\", theme_advanced_fonts: \"Trebuchet=Trebuchet MS,Verdana,Arial,Helvetica,sans-serif;Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;Wingdings=wingdings\", theme_advanced_resize_horizontal: true, theme_advanced_resizing: true, theme_advanced_toolbar_location : \"top\", theme_advanced_statusbar_location : \"bottom\", file_browser_callback : \"mce_moodlefilemanager\", valid_elements : \"\" +\"a[accesskey|charset|class|coords|dirhttpswwwroot}/lib/editor/tinymce/jscripts/tiny_mce/plugins/moodlelink/link.php?id={$courseid}", width: 480, height: 380, resizable: "yes", inline: "yes", close_previous: "no" }, { window: win, input: field_name }); return false; } function mce_saveOnSubmit(id) { var prevOnSubmit = document.getElementById(id).form.onsubmit; document.getElementById(id).form.onsubmit = function() { tinyMCE.triggerSave(); var ret = true; if (prevOnSubmit != undefined) { if (prevOnSubmit()) { ret = true; prevOnSubmit = null; } else { ret = false; } } return ret; }; } EOF; ?>