(Article contents added) |
(Minor formatting changes) |
||
| Line 2: | Line 2: | ||
If you want CKEditor to output valid HTML4 code instead of XHTML, you should configure the behavior of the <code>[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#dataProcessor dataProcessor]</code>. | If you want CKEditor to output valid HTML4 code instead of XHTML, you should configure the behavior of the <code>[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#dataProcessor dataProcessor]</code>. | ||
| − | For some tips on how to achieve this, check the [[CKEditor 3.x/Developers Guide/Output Formatting|Output Formatting]] section of [[CKEditor 3.x/Developers Guide|CKEditor 3.x Developer's Guide]] as well as the | + | For some tips on how to achieve this, check the [[CKEditor 3.x/Developers Guide/Output Formatting|Output Formatting]] section of [[CKEditor 3.x/Developers Guide|CKEditor 3.x Developer's Guide]] as well as the '''Output HTML''' (<code>output_html.html</code>) and '''Output XHTML''' (<code>output_xhtml.html</code>) samples that can be found in the <code>_samples</code> directory of CKEditor installation package. |
If, for example, you want CKEditor to output the self-closing tags in the HTML4 way, creating <code><nowiki><br></nowiki></code> elements instead of <code><nowiki><br /></nowiki></code>, configure the <code>selfClosingEnd</code> setting in the following way. | If, for example, you want CKEditor to output the self-closing tags in the HTML4 way, creating <code><nowiki><br></nowiki></code> elements instead of <code><nowiki><br /></nowiki></code>, configure the <code>selfClosingEnd</code> setting in the following way. | ||
Latest revision as of 13:34, 7 March 2011
If you want CKEditor to output valid HTML4 code instead of XHTML, you should configure the behavior of the dataProcessor.
For some tips on how to achieve this, check the Output Formatting section of CKEditor 3.x Developer's Guide as well as the Output HTML (output_html.html) and Output XHTML (output_xhtml.html) samples that can be found in the _samples directory of CKEditor installation package.
If, for example, you want CKEditor to output the self-closing tags in the HTML4 way, creating <br> elements instead of <br />, configure the selfClosingEnd setting in the following way.
CKEDITOR.on( 'instanceReady', function( ev )
{
ev.editor.dataProcessor.writer.selfClosingEnd = '>';
});