Opened 16 years ago

Closed 16 years ago

#1778 closed Bug (invalid)

Editor doesn't load if fckeditor.js included at end of page

Reported by: realityloop Owned by:
Priority: Normal Milestone:
Component: General Version: FCKeditor 2.5.1
Keywords: Pending Cc:

Description

If you include the fckeditor.js at the end of your webpage, the toolbar doesn't load.

Is there any way to fix this?

Reason: According to "Exceptional Performance : Best Practices for Speeding Up Your Web Site" it is better to put Scripts at the bottom of your page to increase speed of page rendering at client end. http://developer.yahoo.com/performance/rules.html#js_bottom

Change History (4)

comment:1 Changed 16 years ago by Wojciech Olchawa

Keywords: Pending added

Could you please specify where do you place the code exactly? Could you also write if only the toolbar isn't loading or did you mean that FCKeditor doesn't load at all. This probably is a code syntax issue so maybe you could attach the code, than it would be easier for us to determine what causes the problem.

comment:2 Changed 16 years ago by realityloop

For a quick and easy way to replicate it, open:
_samples\html\sample01.html

and move the following line:
<script type="text/javascript" src="../../fckeditor.js"></script>

To the following position in the HTML structure:
<script type="text/javascript" src="../../fckeditor.js"></script>
</body>
</html>

comment:3 Changed 16 years ago by realityloop

oops I've just tested this with sample02.html, which is closer to my actual setup, and found that it is working as expected.

comment:4 Changed 16 years ago by Frederico Caldeira Knabben

Resolution: invalid
Status: newclosed

If the fckeditor.js file is placed at the bottom of the page, the "FCKeditor" class will not be available in the script blocks present before of it. So, it is wrong to move it to the bottom of the page in cases like sample01.html.

To properly do that, you need do wait for the window.onload event to use the FCKeditor class. This is done in sample02.html.

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