Forum closed. New forum available at http://community.wymeditor.org/

A hint to use WYMeditor with application/xhtml+xml

Support forum for WYMeditor.

A hint to use WYMeditor with application/xhtml+xml

Postby Max_B on Thu Dec 18, 2008 9:57 pm

Hi there,
If you are, like me, serving xhtml as application/xhtml+xml to capable browsers, as it should to avoid the famous syndrome of poor/false xhtml, you may have run in trouble, as I did at my first attempt some weeks ago. Without specific adjustment the creation of We fails on Error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7.

This time, I dig in more seriously, looked at the test page from SVN, and found that it runs because We creation is enclosed in a try-catch block, which is a small cheat. In fact it fails as it is but only on a marginal point.
So I looked at the error and found the culprit. It's a small bit of code, on line 18 in default skin.js
Code: Select all
.append("<span>&nbsp;&gt;</span>")

The error is raised from jquery element creation and id due to the >, even if it's specified as &gt;. It should be escaped or something like this.
Strange enough I verified that using
Code: Select all
.append("<span> ></span>") // the white space is utf-8 non-breaking space
DOES work, probably because jquery escapes automatically somewhere, I did not check further.

I choose to simply comment the faulty line because it adds only a cosmetic character and I don't need it for my layout (from the modified layout example).

With this line commented out or modified, one can create WYMeditor without try-catch enclosing block, in page served as application/xhtml+xml.
Max_B
 
Posts: 7
Joined: Wed Sep 10, 2008 11:00 pm

Re: A hint to use WYMeditor with application/xhtml+xml

Postby jfh on Tue Jan 06, 2009 7:40 pm

Interesting, I'll check that. Thanks.
User avatar
jfh
Site Admin
 
Posts: 370
Joined: Sat Sep 23, 2006 8:43 pm
Location: Belgium

Re: A hint to use WYMeditor with application/xhtml+xml

Postby jfh on Tue Jan 06, 2009 8:18 pm

User avatar
jfh
Site Admin
 
Posts: 370
Joined: Sat Sep 23, 2006 8:43 pm
Location: Belgium

Re: A hint to use WYMeditor with application/xhtml+xml

Postby bally on Wed Jan 28, 2009 7:39 pm

jquery itself did not work (until recently) for application/xhtml+xml. I believe that that's been fixed with 1.3.x release.
bally
 
Posts: 4
Joined: Mon Dec 15, 2008 12:27 am

Re: A hint to use WYMeditor with application/xhtml+xml

Postby Max_B on Wed Jan 28, 2009 7:48 pm

Could you elaborate?
I'm using 1.2.6 on most of my sites served as application/xhtml+xml, with no problem.
Its use of innerHTML is questionable as non standard. But it works.
There are some problem with ajax loaded content, mostly on webkit, which can be deal with by using proper name space on outer block of loaded content.
Max_B
 
Posts: 7
Joined: Wed Sep 10, 2008 11:00 pm


Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest