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

WYM issue $('.wymeditor').wymeditor is not a function

Support forum for WYMeditor.

WYM issue $('.wymeditor').wymeditor is not a function

Postby issac.kelly on Sat Feb 02, 2008 2:50 pm

OK, so I have had WYM 0.2 working quite well for a long time, and now I'm trying to get 0.4 to work (honestly I was going to wait until 0.6, but I decided that back in december.. we'll see what happens I guess)

I'm getting the error "$('.wymeditor').wymeditor is not a function" on the following page:

http://www.issackelly.com/admin

please use wymproblem/guest to login.

Further notes: if I use getScript to first call jquery.wymeditor.js instead of $('document').ready() it gets a different error, and one of the XMLHTTP requests gets refused (although the three previous are successful)
issac.kelly
 
Posts: 9
Joined: Sat Feb 02, 2008 2:42 pm

Postby Moxide on Mon Feb 04, 2008 10:46 am

Hello,

First, there is a typo in the WYMeditor's script tag : "text/javscript" instead of "text/javascript".

Then, put this script tag in header.
Moxide
 
Posts: 5
Joined: Tue May 01, 2007 11:40 am

Postby issac.kelly on Mon Feb 04, 2008 6:55 pm

ok, now it looks like my error is more serious than the text/javascript

It calls xhtml_parser.pack.js and wym_css_parser.pack.js just fine, then gets this error.

[Exception... "'Permission denied to call method XMLHttpRequest.open' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "<unknown>" data: no]

Line 0
issac.kelly
 
Posts: 9
Joined: Sat Feb 02, 2008 2:42 pm

Postby Moxide on Mon Feb 04, 2008 10:54 pm

The problem seems to be in the 'stylesheet' option : the domain name of the 'layout.css' path is not the same as the domain name of the page where the script is executed.

If the 'layout.css' file and wymeditor are on the same server, try and give a relative path to 'layout.css' instead of 'http://www.issac ...etc.'.

If not, copy 'layout.css' in the wymeditor's directory, and just write:
Code: Select all
stylesheet : 'layout.css'
Moxide
 
Posts: 5
Joined: Tue May 01, 2007 11:40 am

Postby issac.kelly on Tue Feb 05, 2008 3:46 pm

Ok, Same issue, but it's after all three items are pulled via ajax, and it appears to load correctly.

There is still a fatal error in the XMLHTTP request (which I can't even find out where a fourth XMLHTTP request is in the code, no more $.ajax or $.get or anything.

In the DOM there are two items in the WYM_INSTANCE array (Firebug is awesome) but there is actually only one instance of .wymeditor on the page.
issac.kelly
 
Posts: 9
Joined: Sat Feb 02, 2008 2:42 pm

Postby Moxide on Thu Feb 07, 2008 9:01 pm

You call wymeditor() twice.
You must remove the '$('document').ready...' , after the </body> end tag.

Not related, but you should import 'screen.css', located in /skins/default/.
Moxide
 
Posts: 5
Joined: Tue May 01, 2007 11:40 am

Postby issac.kelly on Wed Feb 13, 2008 1:56 am

Ok, I know its an unrelated issue, but why isn't it pulling the stylesheet now?
issac.kelly
 
Posts: 9
Joined: Sat Feb 02, 2008 2:42 pm


Return to Support

Who is online

Users browsing this forum: No registered users and 2 guests