Ticket #2869: 2869_2.patch
File 2869_2.patch, 5.8 KB (added by , 15 years ago) |
---|
-
_source/plugins/toolbar/plugin.js
211 211 'Bold', 'Italic', 'Underline', 'Strike', '-', 212 212 'Subscript', 'Superscript', '-', 213 213 'SelectAll', 'RemoveFormat', '-', 214 'Smiley', 'HorizontalRule', 'SpecialChar', 'PageBreak' 214 'Smiley', 'HorizontalRule', 'SpecialChar', 'PageBreak','-', 215 'BlockOutline' 215 216 ] 216 217 ]; -
_source/plugins/blockoutline/blockoutline.css
1 .cke_block_outline p, 2 .cke_block_outline div, 3 .cke_block_outline pre, 4 .cke_block_outline address, 5 .cke_block_outline blockquote, 6 .cke_block_outline h1, 7 .cke_block_outline h2, 8 .cke_block_outline h3, 9 .cke_block_outline h4, 10 .cke_block_outline h5, 11 .cke_block_outline h6 12 { 13 background-repeat: no-repeat; 14 border: 1px dotted gray; 15 padding-top: 8px; 16 padding-left: 8px; 17 } 18 19 .cke_block_outline p 20 { 21 background-image: url(images/blockoutline.block_p.png); 22 } 23 24 .cke_block_outline div 25 { 26 background-image: url(images/blockoutline.block_div.png); 27 } 28 29 .cke_block_outline pre 30 { 31 background-image: url(images/blockoutline.block_pre.png); 32 } 33 34 .cke_block_outline address 35 { 36 background-image: url(images/blockoutline.block_address.png); 37 } 38 39 .cke_block_outline blockquote 40 { 41 background-image: url(images/blockoutline.block_blockquote.png); 42 } 43 44 .cke_block_outline h1 45 { 46 background-image: url(images/blockoutline.block_h1.png); 47 } 48 49 .cke_block_outline h2 50 { 51 background-image: url(images/blockoutline.block_h2.png); 52 } 53 54 .cke_block_outline h3 55 { 56 background-image: url(images/blockoutline.block_h3.png); 57 } 58 59 .cke_block_outline h4 60 { 61 background-image: url(images/blockoutline.block_h4.png); 62 } 63 64 .cke_block_outline h5 65 { 66 background-image: url(images/blockoutline.block_h5.png); 67 } 68 69 .cke_block_outline h6 70 { 71 background-image: url(images/blockoutline.block_h6.png); 72 } -
_source/plugins/blockoutline/plugin.js
1 /* 2 Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. 3 For licensing, see LICENSE.html or http://ckeditor.com/license 4 */ 5 6 /** 7 * @fileOverview The "blockoutline" plugin. Enable it will make all block level elements being decorated with a border and the element name displayed on the left-right corner. 8 */ 9 10 (function() 11 { 12 BLOCK_OUTLINE_CLASSNAME = 'cke_block_outline'; 13 BLOCK_OUTLINE_CSS_PATH = 'blockoutline.css'; 14 15 CKEDITOR.plugins.add( 'blockoutline', 16 { 17 requires : [ 'wysiwygarea' ], 18 19 init : function( editor , pluginPath) 20 { 21 editor.addCommand( 22 'showblock' , 23 { 24 exec : function ( editor ) 25 { 26 if ( this.state !== CKEDITOR.TRISTATE_DISABLED ) 27 { 28 editor.document 29 .getBody()[ this.state === CKEDITOR.TRISTATE_OFF ? 'addClass' 30 : 'removeClass' ] 31 ( BLOCK_OUTLINE_CLASSNAME ); 32 this.toggleState(); 33 } 34 } 35 }); 36 37 editor.ui.addButton( 'BlockOutline' , { 38 lablel :editor.lang.blockOutline, 39 command :'showblock' 40 }); 41 42 //Load content style for every editor instance. 43 editor.on( 'contentDom', function(){ 44 editor.document.appendStyleSheet( 45 CKEDITOR.basePath + 46 pluginPath + BLOCK_OUTLINE_CSS_PATH ); 47 }); 48 } 49 }); 50 51 })(); -
_source/core/editor.js
185 185 186 186 // Call the plugin method (beforeInit and init). 187 187 if ( plugin[ methods[ m ] ] ) 188 plugin[ methods[ m ] ]( editor 188 plugin[ methods[ m ] ]( editor, plugin.path); 189 189 } 190 190 } 191 191 -
_source/core/command.js
19 19 }; 20 20 21 21 CKEDITOR.event.implementOn( CKEDITOR.command.prototype ); 22 23 /* 24 * Toggle the current state of command and refresh. 25 */ 26 CKEDITOR.command.prototype.toggleState = function(){ 27 this.state = (this.state === CKEDITOR.TRISTATE_ON? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_ON); 28 this.fire( 'state' ); 29 }; -
_source/core/config.js
146 146 * @example 147 147 * config.plugins = 'basicstyles,button,htmldataprocessor,toolbar,wysiwygarea'; 148 148 */ 149 plugins : 'basicstyles,button,elementspath,horizontalrule,htmldataprocessor,keystrokes,newpage,pagebreak,removeformat,smiley,sourcearea,specialchar,tab,toolbar,wysiwygarea ',149 plugins : 'basicstyles,button,elementspath,horizontalrule,htmldataprocessor,keystrokes,newpage,pagebreak,removeformat,smiley,sourcearea,specialchar,tab,toolbar,wysiwygarea,blockoutline', 150 150 151 151 /** 152 152 * The theme to be used to build the UI. -
_source/skins/default/toolbar.css
305 305 { 306 306 background-position: 0 -880px; 307 307 } 308 .cke_skin_default a.cke_button_showblock .cke_icon 309 { 310 background-position: 0 -1136px; 311 }