23 Jan 2008 9:08 AM #1
I was looking at the HTML code generated by Ext HTML editor and it could be more XHTML-compliant. For example, actually it is producing FONT tags, which is deprecated. Instead of using FONT tags, it could generate SPAN tags with inline styles. In my opinion, styles are much better, standard and more customizable.
Also, I didn't find anything to validate forms or mask/format fields. Does Ext have something like this?
23 Jan 2008 3:09 PM #2
28 Jan 2008 11:32 AM #3
I agree with you, but the HTML editor of ExtJS could generate XHTML with inline styles. This do not depend of the rest of your web site. My main concern is that it produces rich text that is more portable and compliant with modern standards, even if you particularly do not use them in the rest of your application. Such data will be saved in databases or sent by Email, so it must be well done.
1 Feb 2008 8:30 AM #4
Yeah it's an iffy one this, especially when ones thinks about data input and the fact that you are mixing data with markup when you format it with a wysiwyg. This basically mixes valuable data with markup rubbish, bloats your database and corrupts valuable data making it hard to do accurate searches etc. I think the best approach to the wysiwig would have it output data with some kind of xml tags or something so you could easily parse them to reflect the type of rich text parameters required by the platform that you wanted to display the data on.
This would make the output easily compatible with everything without relying on one type of specification.
3 Feb 2008 5:31 AM #5
You are absolutely right. But I think this is something to concern in the case of big web sites. The small ones could use anyway the XHTML produced to things like a small CMS, for example. XML parsing is not something I would like to worry about in a small web site, where my customer don't want to spend too much money on it.
5 Feb 2008 6:15 AM #6
What you mean...
Unless you are a graphic designer, typographer or even design-conscious, "what you mean" is rarely the same than "what you see".
To me, the real problem with extJs html editor (and with many other) is the way that it "allows" test structuration and formatting.
Take a look at WYM Editor, where WYM stands for what you mean. You can directly check the demo at http://demo.wymeditor.org/
It's purpose is not to allow the user to style his text, but to structure it. By settings headings, paragraphs, lists, pullquotes... The outgoing design is purely css-driven. Wym editor is far from perfection, but that's a really cool step on the road of semantic html. Merged with the power of Ext, that could be the html/text editor I allways looked for (I am still looking for).
12 Feb 2008 2:09 PM #7
25 Feb 2008 10:03 AM #8
Non-XHTML-compliant text generated by HTMLEditor
For me to archieve (dodgy)HTML to ODF conversion I need to process the resulting HTML in code to make things XML-style, and then apply a XSLT stylesheet to get the actual ODF fragment. I had to fight hard in pure XSLT before realizing that the dodgy HTML needs a useless, out-of-business-rules programming before being transformed by the xslt processor.
25 Feb 2008 8:46 PM #9
- Join Date
- Mar 2007
- Melbourne, Australia (aka GMT+10)
- Vote Rating
funny thing is that you can't actually have valid XHTML as it is a hybrid format... there's actually no such thing as valid xhtml as the format is not actually a valid format... just use tinymce or fckeditor if you want xhtml output...Lead Trainer / Sencha Specialist
Teahouse Training Company
SenchaWorld.com - Videos, and stuff
Sencha.Community - Tools, Extensions and Resources
TeahouseHQ.com - Sencha Ecosystem Training Portal
Code Validation : JSLint | JSONLint | JSONPLint
26 Feb 2008 10:08 PM #10
There are a few problems with the HTMLEditor creating XHTML vs the HTML it does now
1. Ext does not generate any HTML. The HTML generated is by the browsers designMode implementation.
2. The Ext HTMLEditor is intended to be lightweight (~8k) vs other solutions which do what you describe (100k+). If you need those features, one of those would be a better solution. There is even a UX for TinyMCE available.
3. Ext could potentially scrub that HTML and try to clean it up but this poses 2 additional issues:
a) It's highly likely the modified HTML can no longer be edited cross browser. This is the really big issue.
b) Cleaning/validating input in a UI component is not the right place IMO. If you need XHTML, I'd recommend cleaning the HTML at a more appropriate spot e.g. on the server. The are tons of util classes available to do it in Java, PHP and I am sure other languages as well.
Hopefully this explanation helps.Jack Slocum
Sencha Co-Founder, Ext JS Founder
Original author of Ext JS 1, 2 & 3.