Hi to all,
i can´t figure out how to avoid that the editor is rewriting html code with style tag.
so when i insert this:
after saving it it converted to this
so maybe someone has a hint, please
greets marek
i can´t figure out how to avoid that the editor is rewriting html code with style tag.
so when i insert this:
<div style="background: transparent
url('pic.gif') top left
no-repeat scroll; padding: 4px 0 4px 4px; width:215px!important;">TEST</div>after saving it it converted to this
<div 0pt="" 215px="" 4px="" left="" no-repeat="" padding:="" pic.gif="" scroll="" style="" top="" width:=""> TEST</div>
so maybe someone has a hint, please
greets marek

Re: Avoid rewriting style tags
Re: Avoid rewriting style tags
ok - but what?
when i past this in:
then everythings fine. After inserting an "background-image" it´s breaks again.
So does the Editor maybe has a ruleset where to define this?
greets marek
Re: Avoid rewriting style tags
Re: Avoid rewriting style tags
Systemconfig is: OsCommerce / PHP5 / MySQL 5
Javascript (MooTools 1.2):
This Script is used when i change language on the fly (this is just a short description of what it does)
When i click on other language flag, a function is called that does the following:
1. i write back content from CKEDITOR to hidden textarea of active language
2. i write content from from hidden textarea of other language to CKEDITOR
function changeLanguage(options...) { ... if (CKEDITOR.instances.EDITOR0 != undefined) { $('products_description['+actTXTid+']_id').set('value',EDITOR.instances.EDITOR0.getData()) } else { $('products_description['+actTXTid+']_id').value = $$('.EDITOR0area').get('value'); } ... CKEDITOR.instances.HDEDITOR0.setData($('products_description['+active_lang+']_id').get('value')); ... }function toggleEDITOR() { if (!CKEDITOR.instances.EDITOR0) { CKEDITOR.replace( 'EDITOR0', { language: '{/literal}{$shop_language}{literal}' }); return; } else { CKEDITOR.instances.HDEDITOR0.destroy(); }var HDEDITORstat = "{/literal}{$HTML_AREA_WYSIWYG_DISABLE}{literal}"; window.addEvent('domready', function(){ if (EDITORstat == "Enable") { toggleHDEDITOR(); } });(i´ve shorten the hole script, ´cause it really long)
The Textarea:
(the editor is loaded into the first textarea - then hidden textareas are generated as often as languages)
<textarea name="EDITOR0" class="EDITOR0area">{$pInfo->arr_products_description.$id}</textarea> {foreach.....} <div class="{$style}" id="lang_div[{$item.id}][4]"> <textarea name="products_description[{$item.id}]" id="products_description[{$item.id}]_id" style="display:none">{$pInfo->arr_products_description.$id}</textarea> </div> {/foreach}When i disable editor, everythings fine
But the very interesting thing is, when i save the first time, everythings fine - when i make chages and
save then, div with style tag get broken