Radiant 0.6.6 - WYMeditor not working

Is anyone else having trouble with Radiant 0.6.6 and WYMeditor? I’m
getting JavaScript errors on page load that are preventing the WYMeditor
Filter from loading.

My setup…

  • running in development mode on 0.6.6 gem
  • tested in both existing and new app (new app setup is as follows)
  • environment.rb setup is correct:
    config.extensions = [ :shards, :wym_editor_filter, :all ]
  • :all = the default Archive, Markdown, Textile
  • Shards is fresh from the SVN repository tag 0.6.6
  • WYMeditor is fresh from
    http://www.gorilla-webdesign.be/artikel/48-WYM+on+Radiant

Firebug says…

prototype.js (line 3484)
element has no properties
var method = element.tagName.toLowerCase();

Anybody else seeing this?

  • Dave

Hi David,

David P. wrote:

Firebug says…

prototype.js (line 3484)
element has no properties
var method = element.tagName.toLowerCase();

Anybody else seeing this?

  • Dave

I am getting the same. See the comments at the bottom of the maintainers
post - http://gorilla-webdesign.be/artikel/48-WYM+on+Radiant.

Cheers,
Mark

Mark G. wrote:

I am getting the same. See the comments at the bottom of the maintainers
post - http://gorilla-webdesign.be/artikel/48-WYM+on+Radiant.

It looks like the issue is 0.6.6 is outputting filter select tags with
id=“part_0_filter_id” while WYMeditor is looking for the old style of
id=“part[0][filter_id]”. I’ve fixed this for Pages and am working on
Snippets. I’ll paste the necessary code changes as a pastie when I’m
done.

  • David

David P. wrote:

It looks like the issue is 0.6.6 is outputting filter select tags with
id=“part_0_filter_id” while WYMeditor is looking for the old style of
id=“part[0][filter_id]”. I’ve fixed this for Pages and am working on
Snippets. I’ll paste the necessary code changes as a pastie when I’m
done.

It looks like fixing Snippets compatibility with WYMeditor is a bigger
issue, so I need to leave that alone for now, sorry.

Here are the code fixes to get WYMeditor back up and editing Pages:

http://pastie.caboo.se/184897
http://pastie.caboo.se/184899

  • David

Hi David,

David P. wrote:

http://pastie.caboo.se/184897
http://pastie.caboo.se/184899

  • David

Thanks for the updates. They don’t seem to be working yet but I will
need to double check my changes.

Also, you are still using .rhtml. I thought that as Radiant 0.6.6 used
Rails 2 that you would need to use .html.erb.

Cheers,
Mark

Mark G. wrote:

Thanks for the updates. They don’t seem to be working yet but I will
need to double check my changes.

Also, you are still using .rhtml. I thought that as Radiant 0.6.6 used
Rails 2 that you would need to use .html.erb.

I grabbed the newest version of WYMeditor and the 0.6.6 tag SVN
repository version of Shards. Maybe you are using an older version of
one or the other? Also, the second pastie can either go in the extension
before the rake task, or in the app’s public directory after the rake
task.

I believe Rails 2 allows for .rhtml for backwards-compatibility, but
.html.erb is the preferred method going forward.

  • David

David P. wrote:

It looks like fixing Snippets compatibility with WYMeditor is a bigger
issue, so I need to leave that alone for now, sorry.

Tim Blair has handled fixing Snippets in WYMeditor. Check out the
following for his patch:

http://gorilla-webdesign.be/artikel/48-WYM+on+Radiant
http://pastie.caboo.se/186091

  • Dave

Hi,

I updated the extension with David and Tim’s patches. The extension is
now also hosted on github; http://github.com/jomz/wymeditor-for-radiant

do let me know if you encounter any problems with it.

Regards,

Benny

Benny D. wrote:

I updated the extension with David and Tim’s patches. The extension is
now also hosted on github; http://github.com/jomz/wymeditor-for-radiant

Thanks Benny!

  • Dave

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs