Changes between Initial Version and Version 1 of Ticket #9993, comment 4


Ignore:
Timestamp:
Feb 1, 2013, 10:03:59 AM (7 years ago)
Author:
tema
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #9993, comment 4

    initial v1  
    11Btw, for almost transparent switching to DIV mode from BR mode you can write a rule for unwrapping every DIV, something like
    22{{{
    3 'div': function(element) { delete element.name; return element; }
     3'div': function(element) { delete element.name; element.append(new CKEDITOR.dom.element('br')); return element; }
    44}}}
    5 Also needs a proper condig with the newlines for DIVs.
     5Also needs a proper config with the newlines for DIVs.
    66
    77If you have some user-generated divs you want to save, you can add an additional step when loading content in CKEditor, which involves adding "class='userDiv'" to every div (can be done with jQuery). Then, unwrap only div without any attributes. I hope I'm explaining correctly. I implemented this, but the code is really tied now.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy