karthick2014 / jwysiwyg

Automatically exported from code.google.com/p/jwysiwyg
0 stars 0 forks source link

Doctype switch solves strange behaviour in IE7 #41

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Had an issue with initial html-content in IE7. Solved it by switching the
doctype in the script.

WYSIWYG - jQuery plugin 0.4

Original line 76:

            html : '<'+'?xml version="1.0" encoding="UTF-8"?'+'><!DOCTYPE
html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html
xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head><meta
http-equiv="Content-Type" content="text/html;
charset=UTF-8">STYLE_SHEET</head><body>INITIAL_CONTENT</body></html>',

Changed to:

            html : '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'+'<'+'?xml
version="1.0" encoding="UTF-8"?'+'><html
xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head><meta
http-equiv="Content-Type" content="text/html;
charset=UTF-8">STYLE_SHEET</head><body>INITIAL_CONTENT</body></html>',

Still wondering what that is good for: html : '<'+'? ... 

Original issue reported on code.google.com by kris.sch...@gmail.com on 18 Aug 2008 at 5:18

GoogleCodeExporter commented 8 years ago
Confirming: This is due to the quirks mode of Internet Explorer. the < ? xml 
....> is not part of xhtml standard 
and should be removed.

For more info on quirks-mode:
http://www.quirksmode.org/css/quirksmode.html
http://www.cs.tut.fi/~jkorpela/quirks-mode.html

Original comment by beat...@gmail.com on 5 Oct 2008 at 4:48

GoogleCodeExporter commented 8 years ago
Thanks, landed in 
http://github.com/akzhan/jwysiwyg/commit/51a2db004bf8dcf556febfd1afe008f2244fc7f
a

Original comment by akzhan.a...@gmail.com on 27 Jun 2010 at 10:02