The problem I'm currently having trying to get the editor to handle HTML 5 content is that it wants to wrap unknown tags with paragraph tags. If there's a setting that will prevent this, I can't seem to find it.
Otherwise, if you include, at a bare minimum, an HTML 5 CSS reset to provide a few default styles, the editor seems capable of displaying HTML 5 content.
Thanks for your assistance. I wrote my own html5.dtd, but I could not use FCKdtd2js. I receive the following error:
>java -jar FCKdtd2js.jar dtd\html401-strict.dtd
At line 81, column 8:Expected GT instead of NMTOKEN(--)
com.wutka.dtd.DTDParseException:At line 81, column 8:Expected GT instead of NMTOKEN(--)
at com.wutka.dtd.DTDParser.expect(DTDParser.java:311)
at com.wutka.dtd.DTDParser.parseEntityDef(DTDParser.java:916)
at com.wutka.dtd.DTDParser.parseEntity(DTDParser.java:818)
at com.wutka.dtd.DTDParser.parseTopLevelElement(DTDParser.java:262)
at com.wutka.dtd.DTDParser.parse(DTDParser.java:121)
at com.wutka.dtd.DTDParser.parse(DTDParser.java:103)
at net.fckeditor.devutil.dtd.WutkaDTDParser.parseXmlDefinition(WutkaDTDParser.java:30)
at net.fckeditor.devutil.dtd.DTDJsGenerator.run(DTDJsGenerator.java:137)
at net.fckeditor.devutil.dtd.DTDJsGenerator.main(DTDJsGenerator.java:95)
Notice in this example that I'm actually trying to use the tool with one of the existing, included DTDs. I tried absolute paths and everything. Am I doing something wrong?
Sorry, I've never used it, so I can't tell what might be wrong.
Anyway, you must realize the the dtd.js file that it's being used has been manually tuned afterward to reflect extra data so it might be easier try to adjust that file (I don't know, I haven't tried it)
I've filed a ticket @ http://dev.fckeditor.net/ticket/4990 and I'll continue to make noise and report progress whenever I can. At this point, both TinyMCE and CKEditor break HTML5. I would love to see CKEditor be the first to prove itself.
The DTD thing is borked, don't even try it. In fact, the DTD parser used by FCKdtd2JS doesn't work on the official DTD's anyway. Until someone wants to convert all of the W3's SGML DTD's to XML DTDs, it's a dark, baron path.
We'll be upgrading to CKEditor 3 in Liferay 6, but we're gonna go ahead and add in the HTML5 support ourselves, since CKEditor doesn't seem interested in updating it within theirs.
We'll be upgrading to CKEditor 3 in Liferay 6, but we're gonna go ahead and add in the HTML5 support ourselves, since CKEditor doesn't seem interested in updating it within theirs.
It will be quite easier if you provide a patch (in the tracker) instead of the modified version of a compressed file. Or you could try to implement it as a plugin.
I'll do my best to help, but there have been multiple threads over the last several months from the community asking for these features, and I've provided this example for a month all while a ticket for this work has been sitting unmodified for four months. I understand there might have been other commitments, but (if there had been time) I would have liked to have seen some effort from the other side. Discovery for this process took a few hours without understanding the product, and I imagine that the developers could have seen this in minutes.
I've also now updated the existing ticket and attached the modified dtd.js.
I have absolutely no idea. It's really confusing me. We switched to the YUI3 one, but I'd still love to see this, just because I've invested so much time bugging them and even trying to contribute.
Re: HTML5 support
Frederico Knabben
CKEditor Project Lead and CKSource Owner
--
Follow us on: Twitter | Facebook | Google+ | LinkedIn
Re: HTML5 support
Otherwise, if you include, at a bare minimum, an HTML 5 CSS reset to provide a few default styles, the editor seems capable of displaying HTML 5 content.
- jason
Re: HTML5 support
If I use code like this:
My code is transformed through the WYSIWYG into:
Re: HTML5 support
You can provide your own dtd specifying how tags are to be handled.
Check the _source/core/dtd.js file. You can create your own one by altering that or using the FCKdtd2js tool:
https://svn.fckeditor.net/FCKdtd2js/trunk/
If you then provide a patch or plugin for other people wanting to use the HTML tags I'm sure that someone would appreciate that.
Re: HTML5 support
Thanks for your assistance. I wrote my own html5.dtd, but I could not use FCKdtd2js. I receive the following error:
Notice in this example that I'm actually trying to use the tool with one of the existing, included DTDs. I tried absolute paths and everything. Am I doing something wrong?
Re: HTML5 support
Anyway, you must realize the the dtd.js file that it's being used has been manually tuned afterward to reflect extra data so it might be easier try to adjust that file (I don't know, I haven't tried it)
Re: HTML5 support
thanks alfonsoml,
I've filed a ticket @ http://dev.fckeditor.net/ticket/4990 and I'll continue to make noise and report progress whenever I can. At this point, both TinyMCE and CKEditor break HTML5. I would love to see CKEditor be the first to prove itself.
Jonathan
Re: HTML5 support
The DTD thing is borked, don't even try it. In fact, the DTD parser used by FCKdtd2JS doesn't work on the official DTD's anyway. Until someone wants to convert all of the W3's SGML DTD's to XML DTDs, it's a dark, baron path.
With that being said, I modified ckeditor.js @ http://sandbox.thewikies.com/ck-html5/ and have HTML5 elements working properly ( *mostly properly; some things, like anchor links around block elements, are still not working ). However, compare this to an unmodified ckeditor.js @ http://sandbox.thewikies.com/ck-html5/sans.html and you'll see it's a big step forward.
Now, I don't understand how the DTD in CK's JS is working, but this gives you 85% of what you want. I'll continue to report progress as it comes.
Jonathan
Re: HTML5 support
I've moved the demo to http://sandbox.thewikies.com/html5-ckeditor/
We'll be upgrading to CKEditor 3 in Liferay 6, but we're gonna go ahead and add in the HTML5 support ourselves, since CKEditor doesn't seem interested in updating it within theirs.
Re: HTML5 support
It will be quite easier if you provide a patch (in the tracker) instead of the modified version of a compressed file. Or you could try to implement it as a plugin.
Re: HTML5 support
I would happily provide you with the modified dtd.js, and I've also updated the demo page with the corresponding hyperlink.
http://sandbox.thewikies.com/html5-ckeditor/dtd.js
I'll do my best to help, but there have been multiple threads over the last several months from the community asking for these features, and I've provided this example for a month all while a ticket for this work has been sitting unmodified for four months. I understand there might have been other commitments, but (if there had been time) I would have liked to have seen some effort from the other side. Discovery for this process took a few hours without understanding the product, and I imagine that the developers could have seen this in minutes.
I've also now updated the existing ticket and attached the modified dtd.js.
http://dev.fckeditor.net/ticket/4556
Re: HTML5 support
Re: HTML5 support
We're integrating my patch into Liferay v6.0. I don't know why CKEditor did not get this into v3.2.
Re: HTML5 support
Re: HTML5 support
Re: HTML5 support
Re: HTML5 support