source: extensions/FCKEditor/fckeditor.tpl @ 9484

Revision 4630, 1.2 KB checked in by patdenice, 10 years ago (diff)

[Plugin][FCK Editor]
Add editor to page banner edition.
Allow to add FCK Editor instance in any plugin.

Line 
1{known_script id="ckeditor" src=$FCK_PATH|@cat:"ckeditor/ckeditor.js"}
2{html_head}
3<style type="text/css">
4FORM#catModify TABLE TABLE {ldelim} width: 100%; }
5#cke_page_banner {ldelim} overflow: auto; }
6</style>
7
8<script type="text/javascript">
9{if $FCK_TOOLBAR == 'Basic'}
10CKEDITOR.config.toolbar_Basic =
11[
12  ["Source"],["Bold","Italic","Underline"],
13  ["JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock"],
14  ["Styles","Format","Font","FontSize"],
15  ["Link","Unlink","ShowBlocks"]
16];
17{/if}
18CKEDITOR.config.width = "{$FCK_WIDTH}";
19CKEDITOR.config.height = "{$FCK_HEIGHT}";
20CKEDITOR.config.toolbar = "{$FCK_TOOLBAR}";
21
22{if !empty($FCK_areas)}
23window.onload = function() {ldelim}
24{foreach from=$FCK_areas item=area}
25  {if !isset($FCK_config.$area) or $FCK_config.$area}
26  CKEDITOR.replace('{$area}');
27  {/if}
28{/foreach}
29}
30{/if}
31
32function toogleEditor(name) {ldelim}
33  if (typeof( CKEDITOR.instances[name] ) != "undefined") {ldelim}
34    CKEDITOR.instances[name].destroy();
35    jQuery.post("plugins/FCKEditor/update_config.php", {ldelim}area: name, status: "off"});
36  } else {ldelim}
37    CKEDITOR.replace(name);
38    jQuery.post("plugins/FCKEditor/update_config.php", {ldelim}area: name, status: "on"});
39  }
40}
41</script>
42{/html_head}
Note: See TracBrowser for help on using the repository browser.