Topic: WYMeditor & prototype

Hi guys,

I've been messing around with the WYM editor helper which is an awesome javascripty textarea replacement for textile markup. The editor itself is working great but it seems to somehow break the $() method that comes with prototype. In my page I wrote these lines:

  console.log( document.getElementById('header') )

Normally both show the same result in the Firebug console:
<div id="header">
<div id="header">

But when I include <%= wym_editor_initialize %> in my layout this is the result:

[ ]
<div id="header">

As a result noone of Scriptaculous' normal effects work, they return errors like "element.visible is not a function."

Last edited by marsvin (2007-08-27 13:36:04)

Re: WYMeditor & prototype

Hi marsvin,

I presume you were using the older version of my helper. That had a version of WYM in it that instantiates $ as a shortcut for jQuery. They have fixed that some months ago, now they use $j instead. Just checking out a newer version of WYM or WEH should solve your problem.

Check to get the updated plugin

Re: WYMeditor & prototype

Thanks for the update jomz, it's much appreciated smile

Unfortunately after installing the updated plugin nothing seems to have changed. I removed the old files with rake wym:remove, removed the old plugin directory and installed the new one, set back up with rake wym:install and restarted mongrel but the results seem exactly the same.

My guess is there are still some of the old files in there though, I haven't had time to try a completely fresh install yet. I'll let you know when I know more!

Re: WYMeditor & prototype

I just noticed some replies to your blog entry.. I too appended the following to boot_wym.js and all my problems disappeared:


Last edited by marsvin (2007-10-10 09:37:44)