#10715 closed Bug (invalid)
CKEDITOR.config.allowedContent not working IE8 & IE9
| Reported by: | sjaakmans | Owned by: | |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | General | Version: | 4.2 |
| Keywords: | allowedContent IE8 IE9 | Cc: |
Description
When I load a DIV in my editor, set with HTML content, the DIV will be remove. This happens in IE 8 & 9 also when allowedContent is true. In Firefox, Chrome and IE 10 the option work fine.
I can't set the extraAllowedContent because there are a lot of dirrent classes, and they change sometimes. It would be nice if this bug could be fixed for IE8 & 9.
Attachments (2)
Change History (8)
comment:1 Changed 12 years ago by
| Resolution: | → invalid |
|---|---|
| Status: | new → closed |
comment:2 Changed 12 years ago by
No it is not the cache, i cleared this. I changed the browser settings from: ie8 to ie9 to ie10.
And only ie10 works properly
comment:3 Changed 12 years ago by
Please provide HTML you want to insert, html page where you use editor and settings for it (config.js, html page or external script - whatever you use).
Does it happen in default editor or only when it is integrated with your application, when third-party plugins are used, editor core code customizations are made or when other scripts are used.
comment:4 Changed 12 years ago by
I open the CKEditor in Fancybox. The config.js is loaded (is see some style elements appear). In this Fancybox I load a textarea which contains the HTML. Afterwards I replace the textarea with CKEditor.replace.
config.js
CKEDITOR.stylesSet.add('intro', [
{ name: 'Paragraph', element: 'p', styles: { 'font-size': '24px'} }
]);
CKEDITOR.stylesSet.add( 'my_styles', [{ name : 'Intro', element : 'p', attributes : { 'class' : 'intro' } },
{ name : 'Normaal', element : 'p' },
{ name : 'H2', element : 'h2' },
{ name : 'H3', element : 'h3' },
{ name : 'H4', element : 'h4' },
{ name : 'Adres', element : 'address' }]);
CKEDITOR.editorConfig = function( config ) {
config.language = 'nl';
config.toolbar_Full =
[
['Source','-','NewPage','Preview'],
['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print', 'SpellChecker', 'Scayt'],
['Undo','Redo','-','Find','Replace','Styles'],
'/',
['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
['NumberedList','BulletedList','-','Outdent','Indent','Table', 'Image'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','Templates'],
['Link','Unlink','modules','Anchor','-','Maximize', 'ShowBlocks','tokens']
];
config.toolbar_widget =
[
['Bold','Italic','Underline','Link','Unlink','Image']
];
config.height = 500;
config.format_tags = 'p;intro;h2;h3;h4;address';
config.format_intro = { element : 'p', attributes : { 'class' : 'intro' } };
config.stylesSet = 'my_styles';
config.allowedContent = true;
config.contentsCss = '/templates/css/editor.css';
config.filebrowserBrowseUrl = '/admin_cp/templates/resources/editor/filemanager/index.php';
config.filebrowserImageBrowseUrl = '/admin_cp/templates/resources/editor/filemanager/index.php';
config.templates_files = ['/admin_cp/templates/resources/editor/templates/specs_table.js'];
config.toolbar = 'Full';
};
The fancybox code which I use to replace
CKEDITOR.replace(
"widget_editor",
{
toolbar: 'widget',
height: parseInt(return_data.widgets_hoogte, 10)+editor_offset_height,
width: parseInt(return_data.widgets_breedte, 10)+editor_offset_width
}
);
The HTML which I load
<div class="peopleTextBlock widget"> <h2>header</h2> <p>Long content text</p> <div class="readMore"> <a class="arrowWhite" href="#"> read more </a> </div> <div class="clear"></div> </div><!--END peopleTextBlock-->
Changed 12 years ago by
| Attachment: | Selection_107.png added |
|---|
Changed 12 years ago by
| Attachment: | Selection_108.png added |
|---|
comment:5 Changed 12 years ago by
I used your config and loaded HTML you given and everything works fine.
comment:6 Changed 12 years ago by
Ok found the problem, nothing with CKEditor.
The problem was a combination of jQuery and IE. When I call the $(element).html('<b>'), the content in the textarea was formatted. Only in IE lower than IE 9. I had to use $(element).val('<b>');
Why I thought it was a bug in CKEditor?: I changed from version 3 to 4 and then the problem occured.
Thanks for the help.

Cache? I'm 99,9% sure that allowedContent=true works correctly on every browser.