Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#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:


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)

Selection_107.png (80.9 KB) - added by Piotrek Koszuliński 8 years ago.
Selection_108.png (51.7 KB) - added by Piotrek Koszuliński 8 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 8 years ago by Piotrek Koszuliński

Resolution: invalid
Status: newclosed

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

comment:2 Changed 8 years ago by sjaakmans

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 8 years ago by Jakub Ś

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 8 years ago by sjaakmans

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.


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 =
			['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print', 'SpellChecker', 'Scayt'],
			['NumberedList','BulletedList','-','Outdent','Indent','Table', 'Image'],
			['Link','Unlink','modules','Anchor','-','Maximize', 'ShowBlocks','tokens']

	config.toolbar_widget =
	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

		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">
	<p>Long content text</p> 	
	<div class="readMore">
		<a class="arrowWhite" href="#"> read more </a>
	<div class="clear"></div>
</div><!--END peopleTextBlock-->

Changed 8 years ago by Piotrek Koszuliński

Attachment: Selection_107.png added

Changed 8 years ago by Piotrek Koszuliński

Attachment: Selection_108.png added

comment:5 Changed 8 years ago by Piotrek Koszuliński

I used your config and loaded HTML you given and everything works fine.

comment:6 Changed 8 years ago by sjaakmans

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.

Note: See TracTickets for help on using tickets.
© 2003 – 2021 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy