Opened 7 years ago

Last modified 7 years ago

#8906 confirmed Bug

[HTML5] [Full page editing]

Reported by: frumbert Owned by:
Priority: Normal Milestone:
Component: General Version: 3.0
Keywords: HTML5 Cc:

Description

When editing a HTML5 Boilerplate page (download a template here: http://github.com/h5bp/html5-boilerplate/zipball/v3.0.2; see template details here: http://html5boilerplate.com) the conditional comments between the doctype and <html> declaration [used by Modernizr for polyfill detection] are lost. Subsequent html comment blocks within the <html> tags are retained (although the formatting of these is sometimes changed.

Examples of the code before and after are shown in this forum post:: http://cksource.com/forums/viewtopic.php?f=11&t=25267&p=64818#p64818

I verified on the nightly build 3.6.4, downloaded 17 April 2012.

Change History (2)

comment:1 Changed 7 years ago by Matti Järvinen

To simplify finding reasons to this bug. Currently any HTML comment that is not within <html> element gets removed in fullpage edit.

I couldn't reproduce problem with:

    <!--[if lt IE 10]>
    <script type="text/javascript" src="../../Player/js/PIE.js"></script>
    <![endif]-->

Anyways I would suggest as a workaround to replace

<!--[if lt IE 7]> <html lang="en-us" class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>    <html lang="en-us" class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>    <html lang="en-us" class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html lang="en-us" class="no-js"> <!--<![endif]-->

IE hack before edit to plain <html> and after post back again to what ever IE needs it to be.

comment:2 Changed 7 years ago by Jakub Ś

Keywords: HTML5 added; html5 conditional comments removed
Status: newconfirmed
Version: 3.6.4 (SVN - trunk)3.0

This is indeed a great trick presented by Paul Irish in Boilerplate but the problem is that Boilerplate is designed for HTML5 not HTML4.

Current version of CKEditor (3.x) was designed for HTML4 and has some support for HTML5 (but a little support). Further more such code is invalid in HTML4.

On the other hand this code is valid in HTML5 for which we will provide full support in CKEditor v4 (perhaps not full support starting from first 4.x version but eventually it will be there).

To summarize this ticket is valid for HTML5 and CKEditor v4 for which we plan to release RC version soon.

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