Hi,
I'm re-building a content management system for a range of community websites and want to ensure that all website content is standards compliant. In researching this, the consensus seems to be that designing for HTML4.01 strict (with a migration plan to HTML5) is the best current solution for public websites. See:
http://hixie.ch/advocacy/xhtml
http://www.webmasterworld.com/forum21/12026.htm
XHTML1.0 adds complexity to the coding without providing any obvious (to me) benefit.
I've been using fck editor for the last year and I am looking forward to being able to receive standards compliant output so that non-tech users can manage their own web pages and still produce clean markup.
I know that v3 is planned to be XHTML1.0 compliant. However it would then generate tag markup that breaks a HTML4.01 strict page - eg <br /> should be interpreted as <br>> - even though all browsers will accept this. It will certainly prevent such pages passing the w3c validation.
So, I need to know if ckeditor v3 will provide the option to support HTML4.01 strict so that I can decide how best to achieve full standards compliance for these websites.
Cheers,
Chris Gaelic
Thu, 08/06/2009 - 02:03
#1
Re: v3 Support for HTML4.01 Strict
All you need here is a way to change the way the output data is written. CKEditor comes with a very flexible way for that.
Technically speaking, the editor uses a "data processor" to transform the document DOM structure into any kind of data format. By default it transforms it to HTML, through the htmldataprocessor plugin. This plugin does several transformations to the HTML structure and sends it to a "writter", which is also defined as a plugin, the "htmlwritter". It's possible to configure the writter to satisfy all needs, including the need of using or not a slash for empty elements.
In the API, the data processor is one of the editor properties (editor.dataProcessor), while the writter is a property of the data processor (editor.dataProcessor.writter). So, to customize it, you just need to wait the plugins to be loaded and then make the necessary changes to it. This is a simple sample:
This will do the magic for you
Frederico Knabben
CKEditor Project Lead and CKSource Owner
--
Follow us on: Twitter | Facebook | Google+ | LinkedIn
Re: v3 Support for HTML4.01 Strict
Has anyone documented the significant differences between the two specifications?
Cheers,
Chris
Re: v3 Support for HTML4.01 Strict
I had to make a similar change to stop all the indenting within tags ("breakAfterOpen:false").
If someone knows a one-liner to add to the config to do this outside of core files, please comment.
If none, please seriously consider adding simple config options like this. Basic things that come up all the time should be listed in the config but commented out, or in some included cheatsheet: various custom buttons (insert text, add quotes around a word, insert class, etc.), use html 4 style tags, stop indenting the html, etc., etc.
Or why not a wiki? Or even just add a snippets forum???!!! Can you imagine how much wasted time would be saved?
Otherwise it is a nightmare to figure out, you can wait ages before getting an answer on the forum. Taken me days and tons of searching just to set basic things and I still don't know how to insert text at the cursor via a button or dropdown list. Why not include a basic widget or code for that sort of common task? Anyone?