Changes between Initial Version and Version 1 of Ticket #9993, comment 4
- Timestamp:
- Feb 1, 2013, 10:03:59 AM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #9993, comment 4
initial v1 1 1 Btw, for almost transparent switching to DIV mode from BR mode you can write a rule for unwrapping every DIV, something like 2 2 {{{ 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; } 4 4 }}} 5 Also needs a proper con dig with the newlines for DIVs.5 Also needs a proper config with the newlines for DIVs. 6 6 7 7 If 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.