Changes between Initial Version and Version 13 of Ticket #13414
- Timestamp:
- Jul 28, 2015, 2:26:44 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #13414
-
Property
Status
changed from
new
toreview
- Property Owner set to Szymon Kupś
-
Property
Version
changed from
4.4.7
to -
Property
Milestone
changed from
to
CKEditor 4.5.2
- Property Keywords editable contenteditable=true removed
-
Property
Status
changed from
-
Ticket #13414 – Description
initial v13 1 1 I have created custom plugin for ckeditor widget "MyWiget" This plugin definition is given below. 2 2 3 {{{ 3 4 CKEDITOR.plugins.add( 'MyWidget', { 4 5 5 requires: 'widget', 6 7 6 icons: 'MyWidget', 8 9 7 init: function( editor ) { 10 8 editor.widgets.add( 'MyWidget', { 9 allowedContent: 'div(!My_Div);table(!My_tbl);td(!My_td);tr(!My_tr);', 10 requiredContent: 'table(My_tbl)', 11 11 12 allowedContent: 'div(!My_Div);table(!My_tbl);td(!My_td);tr(!My_tr);',13 14 requiredContent: 'table(My_tbl)',15 16 12 editables: { 17 13 content: { 18 19 14 selector: '.My_Div', 20 15 allowedContent: 'span a strong sub sup u em s br ul ol li h1 h2 h3 h4 h5 h6 hr; a[!href,name,id,style]; span[!style]{color}; ' 16 } 17 }, 18 19 template:'<table mode="0" class="My_tbl ckw_contentTextWidget" border="0" cellpadding="0" cellspacing="0" align="center"><tbody><tr class="My_tr"><td class="My_td" valign="top" bgcolor="#FFFFFF" style="text-align : center"><div class="My_Div" style="text-align : left;">Enter your text here...<br> <br> </div></td></tr><tbody></table>', 21 20 22 }23 },24 25 template:'<table mode="0" class="My_tbl ckw_contentTextWidget" border="0" cellpadding="0" cellspacing="0" align="center"><tbody><tr class="My_tr"><td class="My_td" valign="top" bgcolor="#FFFFFF" style="text-align : center"><div class="My_Div" style="text-align : left;">Enter your text here...<br> <br> </div></td></tr><tbody></table>',26 27 21 button: 'Text', 28 22 29 23 upcast: function( element ) { 30 31 24 return element.name == 'table' && element.hasClass( 'My_tbl' ); 32 33 25 }, 34 26 35 data: function(){ 36 37 } 38 27 data: function(){ 28 } 39 29 } ); 40 30 } 41 31 } ); 32 }}} 42 33 43 34 currently I am using ckeditor 4.4.7. and I have configured config file as below. 35 {{{ 44 36 config.enterMode = CKEDITOR.ENTER_BR; 45 37 config.shiftEnterMode = CKEDITOR.ENTER_BR; 46 38 config.autoParagraph = false; 39 }}} 47 40 48 41 Now when I click in the editable div "My_Div" the content [Enter your text here...<br> <br> ] is wrapped in enclosing p tag.