I've created a custom template, but the editor is stripping all styles associated with the img tag (in this case margin) and only leaving float. In other words in my custom template I have:
{
title: 'Right Image',
description: 'Image to the right with margin',
html:
'<p><img src="/panel/js/ckeditor/plugins/templates/templates/images/default.gif" style="float:right; margin: 0 0 10px 10px;" /> Type your text here.</p>'
}
The style margin, when I choose the template is stripped.
This only happens when I set up my toolbar using the "item by item" method. If I leave it as default, the template works as intended.
Which item controls the style element in a way that when it is not included, it strips it out?
Here is my toolbar setup:
config.toolbar = [
{ name: 'document', groups: [ 'mode', 'document', 'doctools' ], items: [ 'Source', 'Templates' ] },
{ name: 'clipboard', groups: [ 'clipboard', 'undo' ], items: [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ] },
{ name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ], items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', '-', 'BidiLtr', 'BidiRtl', 'Language' ] },
{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ], items: [ 'Bold', 'Italic', 'Underline', 'Strike', '-', 'RemoveFormat' ] },
{ name: 'colors', items: [ 'TextColor', 'BGColor' ] },
{ name: 'links', items: [ 'Link', 'Unlink', 'Anchor' ] },
{ name: 'insert', items: [ 'Image', 'Table', 'HorizontalRule', 'SpecialChar', 'Iframe','Youtube' ] },
{ name: 'styles', items: [ 'Styles', 'Format', 'FontSize' ] },
{ name: 'tools', items: [ 'Maximize', 'ShowBlocks' ] },
{ name: 'others', items: [ '-' ] },
];
Thanks for any help you can provide