[TYPO3-RTE] DTD of the RTE's document

Martin Kutschker masi-no at spam-typo3.org
Tue Sep 16 14:20:23 CEST 2008


Martin Kutschker schrieb:
> Stanislas Rolland schrieb:
>> Hi Masi,
>>> Has the document any DTD? I'm asking because certain feature of the IE7
>>> only work with a DTD.
>>>
>>> In particular the conditional attributes of CSS.
>>>
>>> *[lang|=en] { color: red }
>>>
>>> This works only after if I add a DTD to the file. eg
>>>
>>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
>>> "http://www.w3.org/TR/html4/loose.dtd">
>>>
>>> But I couldn't get it working in the RTE.
>>>
>>> My goal is to have a visual representation of the language in the RTE.
>> For all browsers except Firefox, the source document of the RTE iframe
>> is EXT:rtehtmlarea/htmlarea/popups/blank.html
>>
>> This document currently contains:
>> <html>
>> <head>
>> </head>
>> <body>
>> </body>
>> </html>
>>
>> For Firefox, the source of the iframe is "javascript:void(0);"
>>
>> If we need the DTD declaration for IE, we could create a source document
>> specifically for IE.
>>
>> I am not sure I would want to change the source document for the other
>> browsers because my experience is that they are very brittle on this
>> subject. But perhaps you can try adding the DTD declaration in the
>> current file.
> 
> I'll give it a try to see if it makes a difference in the RTE.

Adding a DTD in that file helped. I added XHTML 1.0 Transitional which
seemed to me the best choice.

I guess that CSS2 selectors don't work in quirks mode in IE7, so that's
why you have to add a DTD.

So for me now the questions are, if someone might need to run IE in the
RTE in quirks mode. If not I suggest that you add that DTD (for IE). If,
yes it'll get more complicated with IE8 which has no doctype sniffing
but a meta tag to enforce backwards compatibiliry with older IE
versions. So it should be a "ieStrict" property and not say a "ieDTD"
property.

Masi


More information about the TYPO3-project-rte mailing list