Opened 13 years ago

Closed 13 years ago

#6764 closed Bug (invalid)

Initialization 'by code' fails if script is placed after an IFrame element

Reported by: Nathan Taylor Owned by:
Priority: Normal Milestone:
Component: General Version: 3.4.2
Keywords: iframe, initialization Cc:

Description

If a page containing an element to be replaced 'by code' at page load also contains an IFrame which is declared in the markup before the initialization code, CKEditor will not initialize. If the initialization code is called before the IFrame element is declared, initialization works as expected.

Example:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
   <title>Replace Textarea by Code - CKEditor Sample</title>
   <meta content="text/html; charset=utf-8" http-equiv="content-type" />
   <script type="text/javascript" src="../ckeditor.js"></script>
</head>
<body>
   <p>
	  <textarea cols="80" id="editor1" name="editor1" rows="10"></textarea>
   </p>
   <p>   
	  <iframe src="http://www.google.com" width="800px" height="600px" />
   </p>   
   <script type="text/javascript">
	  CKEDITOR.replace( 'editor1' );
   </script>   
</body>
</html>

This issue only applies to 'by code' initialization; 'by classname' initialization is not affected.

I have tested and reproduced this bug in FireFox, Internet Explorer, Opera and Chrome.

Change History (1)

comment:1 Changed 13 years ago by Garry Yao

Resolution: invalid
Status: newclosed

Please check the right way of writing an iframe (no self-closing).

Please use our forums for discussions and community support.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy