Changes between Initial Version and Version 1 of Ticket #8704, comment 20


Ignore:
Timestamp:
Aug 6, 2012, 1:51:19 PM (8 years ago)
Author:
Amy McCrobie
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #8704, comment 20

    initial v1  
    1010
    1111Is there a CKEditor configuration that can be used to accomplish this? Or, is there a PHP function that I am not aware of that would produce these results?
     12
     13'''Edit:''' I just found the solution. I added this code to the bottom of the page which displays the CKEditor instance:
     14
     15{{{
     16CKEDITOR.on('instanceReady', function(ev)
     17{
     18        ev.editor.dataProcessor.writer.setRules( 'br',
     19        {
     20                indent : false,
     21                breakBeforeOpen : false,
     22                breakAfterOpen : false,
     23                breakBeforeClose : false,
     24                breakAfterClose : false
     25        });
     26        ev.editor.dataProcessor.writer.setRules( 'p',
     27        {
     28                indent : false,
     29                breakBeforeOpen : false,
     30                breakAfterOpen : false,
     31                breakBeforeClose : false,
     32                breakAfterClose : false
     33        });
     34        ev.editor.dataProcessor.writer.setRules( 'ul',
     35        {
     36                indent : false,
     37                breakBeforeOpen : false,
     38                breakAfterOpen : false,
     39                breakBeforeClose : false,
     40                breakAfterClose : false
     41        });
     42        ev.editor.dataProcessor.writer.setRules( 'li',
     43        {
     44                indent : false,
     45                breakBeforeOpen : false,
     46                breakAfterOpen : false,
     47                breakBeforeClose : false,
     48                breakAfterClose : false
     49        });
     50});
     51}}}
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy