Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#5569 closed Bug (invalid)

Setting the doctype to HTML is not working

Reported by: Senthil Owned by:
Priority: Normal Milestone:
Component: Core : Output Data Version:
Keywords: Oracle Cc: Senthil, Pranav


After setting the doctype to HTML, toolbar controls are still generating(XHTML) self-closing tags (it should output <img > instead of <img />). One of our customer wants to set the doctype to HTML but the editor is always genearting the XHTML.


  1. CKEDITOR.config.docType = "<!-- DOCTYPE HTML PUBLIC '-W3CDTD HTML 4.0 TransitionalEN' -->";
  1. Insert a Flash object but it is still inserting the param elements with selfclosed tags.

<p> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase=",0,40,0">

<param name="quality" value="high" /> <param name="movie" value="/ps/flash/Clock.swf" />

<embed pluginspage="" quality="high" src="/ps/flash/Clock.swf" type="application/x-shockwave-flash"></embed></object> </p>

Change History (2)

comment:1 Changed 14 years ago by Garry Yao

Priority: HighNormal
Resolution: invalid
Status: newclosed

The CKEDITOR.config.docType should not be used for this purpose, instead it's just an option for controlling how the page is displayed in editing mode, but not on the output page.
To have HTML4 like output tags, please use the following configuration:

CKEDITOR.on( 'instanceReady', function( ev )
        // Out self closing tags the HTML4 way, like <br>.
        ev.editor.dataProcessor.writer.selfClosingEnd = '>';

comment:2 Changed 14 years ago by Garry Yao

Please refer to our documentation for output formatting.

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