Ticket #7044: 7044.patch
File 7044.patch, 3.5 KB (added by , 13 years ago) |
---|
-
_samples/bbcode.html
17 17 </head> 18 18 <body> 19 19 <h1 class="samples"> 20 CKEditor Sample — Replace Textarea Elements by Class Name20 CKEditor Sample — BBCode plugin 21 21 </h1> 22 22 <div class="description"> 23 23 <p> … … 77 77 colorButton_colors : 'Red/FF0000,Green/00FF00,Blue/0000FF', 78 78 toolbar : 79 79 [ 80 ['Source', '-', 'Save','NewPage','Preview','-','Bold', 'Italic','Underline','-', 'TextColor', 'FontSize','-','Link', 'Image'], 80 ['Source', '-', 'Save','NewPage','Preview','-','Undo','Redo'], 81 ['Find','Replace','-','SelectAll','RemoveFormat'], 82 ['Link', 'Image'], 81 83 '/', 84 ['FontSize', 'Bold', 'Italic','Underline'], 82 85 ['NumberedList','BulletedList','-','Blockquote'], 83 ['Smiley','SpecialChar'], 84 ['Find','Replace','-','SelectAll','RemoveFormat'] 86 ['TextColor', '-', 'Smiley','SpecialChar', '-', 'Maximize'] 85 87 ] 86 88 }); 87 89 -
_samples/index.html
79 79 <li><a class="samples" href="output_for_flash.html">Output for Flash</a><br /> 80 80 Configuring CKEditor to produce HTML code that can be used with Adobe Flash. 81 81 </li> 82 <li><a class="samples" href="bbcode.html">BBCodes</a><br /> 83 Configuring CKEditor to produce BBCode tags instead of HTML. 84 </li> 82 85 <li><a class="samples" href="placeholder.html">Placeholder plugin</a><br /> 83 86 Using the Placeholder plugin to create uneditable sections that can only be created and modified with a proper dialog window. 84 87 </li> -
_source/plugins/bbcode/plugin.js
5 5 6 6 (function() 7 7 { 8 CKEDITOR.on( 'dialogDefinition', function( ev ) 9 { 10 var tab, name = ev.data.name, 11 definition = ev.data.definition; 12 13 if ( name == 'link' ) 14 { 15 definition.removeContents( 'target' ); 16 definition.removeContents( 'upload' ); 17 definition.removeContents( 'advanced' ); 18 tab = definition.getContents( 'info' ); 19 tab.remove( 'emailSubject' ); 20 tab.remove( 'emailBody' ); 21 } 22 if ( name == 'image' ) 23 { 24 definition.removeContents( 'advanced' ); 25 tab = definition.getContents( 'Link' ); 26 tab.remove('cmbTarget'); 27 tab = definition.getContents( 'info' ); 28 // TODO: get rid of lock ratio 29 tab.remove('txtAlt'); 30 tab.remove('txtHeight'); 31 tab.remove('txtWidth'); 32 tab.remove('txtBorder'); 33 tab.remove('txtHSpace'); 34 tab.remove('txtVSpace'); 35 tab.remove('cmbAlign'); 36 } 37 if ( name == 'numberedListStyle' ) 38 { 39 tab = definition.getContents( 'info' ); 40 tab.remove('start'); 41 } 42 }); 43 8 44 var bbcodeMap = { 'b' : 'strong', 'u': 'u', 'i' : 'em', 'color' : 'span', 'size' : 'span', 'quote' : 'blockquote', 'code' : 'code', 'url' : 'a', 'email' : 'span', 'img' : 'span', '*' : 'li', 'list' : 'ol' }, 9 45 convertMap = { 'strong' : 'b' , 'b' : 'b', 'u': 'u', 'em' : 'i', 'i': 'i', 'code' : 'code', 'li' : '*' }, 10 46 tagnameMap = { 'strong' : 'b', 'em' : 'i', 'u' : 'u', 'li' : '*', 'ul' : 'list', 'ol' : 'list', 'code' : 'code', 'a' : 'link', 'img' : 'img', 'blockquote' : 'quote' },