Changeset 2751:a96ec5640056 for plugins/dcCKEditor/_post_config.php
- Timestamp:
- 09/09/14 16:30:31 (11 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/dcCKEditor/_post_config.php
r2738 r2751 31 31 } 32 32 } 33 33 34 34 return url; 35 35 }; 36 36 37 /* Retrieve editor name from URL */ 38 $.getEditorName = function getEditorName(url) { 39 return url.replace(/.*editor=([^&]*)(&.*)?/,'$1'); 37 /* Retrieve editor from popup */ 38 $.active_editor = null; 39 $.getEditorName = function getEditorName() { 40 return $.active_editor; 40 41 } 41 42 })(jQuery); … … 49 50 CKEDITOR.config.skin = 'dotclear,'+dotclear.dcckeditor_plugin_url+'/js/ckeditor-skins/dotclear/'; 50 51 51 <?php if (!empty($dcckeditor_cancollapse_button)):?> 52 <?php if (!empty($dcckeditor_cancollapse_button)):?> 52 53 CKEDITOR.config.toolbarCanCollapse = true; 53 54 <?php endif;?> 54 55 CKEDITOR.plugins.addExternal('entrylink',dotclear.dcckeditor_plugin_url+'/js/ckeditor-plugins/entrylink/'); 55 56 CKEDITOR.plugins.addExternal('entrylink',dotclear.dcckeditor_plugin_url+'/js/ckeditor-plugins/entrylink/'); 56 57 CKEDITOR.plugins.addExternal('dclink',dotclear.dcckeditor_plugin_url+'/js/ckeditor-plugins/dclink/'); 57 58 CKEDITOR.plugins.addExternal('media',dotclear.dcckeditor_plugin_url+'/js/ckeditor-plugins/media/'); … … 75 76 extraPlugins: '<?php echo $defautExtraPlugins;?>', 76 77 77 <?php if (!empty($dcckeditor_format_select)):?> 78 <?php if (!empty($dcckeditor_format_select)):?> 78 79 // format tags 79 80 format_tags: 'p;h1;h2;h3;h4;h5;h6;pre;address', … … 102 103 <?php endif;?> 103 104 'Bold','Italic','Underline','Strike','Subscript','Superscript','Code','Blockquote', 104 105 105 106 <?php if (!empty($dcckeditor_list_buttons)):?> 106 107 'NumberedList', 'BulletedList', … … 135 136 ,'TextColor' 136 137 <?php endif;?> 137 ] 138 ] 138 139 }, 139 140 <?php // add extra buttons comming from dotclear plugins … … 156 157 $('#cke_post_excerpt').addClass('hide'); 157 158 } 158 159 159 160 $('#excerpt-area label').click(function() { 160 161 $('#cke_post_excerpt').toggleClass('hide',$('#post_excerpt').hasClass('hide')); 161 162 }); 162 163 }); 164 165 // @TODO: find a better way to retrieve active editor 166 for (var id in CKEDITOR.instances) { 167 CKEDITOR.instances[id].on('focus', function(e) { 168 $.active_editor = e.editor.name; 169 }); 170 } 163 171 });
Note: See TracChangeset
for help on using the changeset viewer.