Hi,
I'm actually trying to inject Dom in an plugin I made for specific needs, and having an headache an indentation issue.
This is the last version I tried (I've tried in many ways to get the thing working, but nothing I can do)
And for the example, if I append the text 'Introduction' in the Dom élément div, it will show up like this :
The thing is that don't need this useless indentation. Something like this :
Would be perfect.
Could I easily remove this ?
Thanks for helping.
I'm actually trying to inject Dom in an plugin I made for specific needs, and having an headache an indentation issue.
This is the last version I tried (I've tried in many ways to get the thing working, but nothing I can do)
exec:function(editor){
var selection = editor.getSelection().getNative();
var div = new CKEDITOR.dom.element('div');
var hr = new CKEDITOR.dom.element('hr');
div.addClass('sommaire');
hr.addClass('saut_de_page');
if (selection == '' || selection == 'Introduction') {
div.appendText('Introduction');
editor.insertElement(div);
} else {
div.appendText(selection);
editor.insertElement(hr);
editor.insertElement(div);
}
}And for the example, if I append the text 'Introduction' in the Dom élément div, it will show up like this :
<div class="sommaire"> Introduction</div>
The thing is that don't need this useless indentation. Something like this :
<div class="sommaire">Introduction</div>
Would be perfect.
Could I easily remove this ?
Thanks for helping.
