# \[ANN\] WYMeditor filter

**URL:** <https://www.ruby-forum.com/t/ann-wymeditor-filter/118836>\
**Category:** Radiant CMS\
**Created:** [October 31, 2007, 3:07pm UTC](https://www.ruby-forum.com/t/ann-wymeditor-filter/118836 "2007-10-31T15:07:01Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![jomz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/dfb087/32.png) [@jomz](https://www.ruby-forum.com/u/jomz)\
**Post date:** [October 31, 2007, 3:07pm UTC](https://www.ruby-forum.com/t/ann-wymeditor-filter/118836/1 "2007-10-31T15:07:01Z")

</div>

Hi list,

I finally got round to finishing wym editor filter. If you haven’t heard  
of  
WYM before, it beats the crap out of most RTE’s qua keeping your content  
w3c  
valid. I quote;

“WYMeditor has been created to generate perfectly structured XHTML  
strict  
code, to conform to the W3C XHTML specifications and to facilitate  
further  
processing by modern applications.”

This extension uses (requires) the shards extension

Available from  
svn://zuurstof.openminds.be/home/kaizer/svn/rails\_stuff/radiant\_extensions/wym\_editor\_filter

Installation steps on  
[SumoCoders, geeks coding with body](http://www.gorilla-webdesign.be/artikel/48-WYM+on+Radiant) or in the  
README

I also added this to the thirdparty extension list

Regards,

Benny D.

---

<div class="post-metadata">

**Author:** ![jomz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/dfb087/32.png) [@jomz](https://www.ruby-forum.com/u/jomz)\
**Post date:** [October 31, 2007, 7:24pm UTC](https://www.ruby-forum.com/t/ann-wymeditor-filter/118836/2 "2007-10-31T19:24:43Z")

</div>

Dear Benny,

Excellent work. I just installed the extension fine and enjoying  
playing  
around with it. One question though. Your website mentions that you

“… use WYM in combination with page attachments. This gives us the  
luxury of drag-and-drop image inserting, clients totally dig it!”

I tried to see if I could perform the ‘drag-and-drop image inserting’,  
but  
have no success. I am logging into the Radiant administrative interface  
from a Linux OS and I have the page attachments installed as well.

Any further tips will be much appreciated. Thanks once again for this  
great exte  
nsion.

saji  
…

- Benny D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) [2007-10-31 15:06:20  
+0100]:

> This extension uses (requires) the shards extension  
> Regards,
> 
> Benny D.
> 
> * * *
> 
> Radiant mailing list  
> Post: removed\_email\_address@domain.invalid  
> Search: [http://radiantcms.org/mailing-list/search/](http://radiantcms.org/mailing-list/search/)  
> Site: [http://lists.radiantcms.org/mailman/listinfo/radiant](http://lists.radiantcms.org/mailman/listinfo/radiant)

–  
Saji N. Hameed

APEC Climate Center +82 51 668 7470  
National Pension Corporation Busan Building 12F  
Yeonsan 2-dong, Yeonje-gu, BUSAN 611705 removed\_email\_address@domain.invalid  
KOREA

---

<div class="post-metadata">

**Author:** ![jomz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/dfb087/32.png) [@jomz](https://www.ruby-forum.com/u/jomz)\
**Post date:** [January 19, 2008, 6:13pm UTC](https://www.ruby-forum.com/t/ann-wymeditor-filter/118836/3 "2008-01-19T18:13:54Z")

</div>

Has anyone used WYMeditor alongside page\_attachments to get file  
drag-and-drop as the install instructions claim?

[http://www.gorilla-webdesign.be/artikel/48-WYM+on+Radiant](http://www.gorilla-webdesign.be/artikel/48-WYM+on+Radiant)

I just wanted to ping you guys for info before I had a chance to play  
with this myself next week.

---

<div class="post-metadata">

**Author:** ![jomz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/dfb087/32.png) [@jomz](https://www.ruby-forum.com/u/jomz)\
**Post date:** [January 28, 2008, 4:59pm UTC](https://www.ruby-forum.com/t/ann-wymeditor-filter/118836/4 "2008-01-28T16:59:49Z")

</div>

David P. wrote:

> Has anyone used WYMeditor alongside page\_attachments to get file  
> drag-and-drop as the install instructions claim?
> 
> [SumoCoders, geeks coding with body](http://www.gorilla-webdesign.be/artikel/48-WYM+on+Radiant)
> 
> I just wanted to ping you guys for info before I had a chance to play  
> with this myself next week.

Hi David

Did you try this? I haven’t seen any responses about this, but was  
wondering what you thought.

Cheers,  
Mohit.  
1/28/2008 | 11:59 PM.

---

<div class="post-metadata">

**Author:** ![jomz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/dfb087/32.png) [@jomz](https://www.ruby-forum.com/u/jomz)\
**Post date:** [January 28, 2008, 8:08pm UTC](https://www.ruby-forum.com/t/ann-wymeditor-filter/118836/5 "2008-01-28T20:08:02Z")

</div>

Mohit S. wrote:

> Did you try this? I haven’t seen any responses about this, but was  
> wondering what you thought.

Not yet, but with any luck I’ll be trying it tomorrow.

- Dave

---

<div class="post-metadata">

**Author:** ![jomz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/dfb087/32.png) [@jomz](https://www.ruby-forum.com/u/jomz)\
**Post date:** [January 29, 2008, 9:50pm UTC](https://www.ruby-forum.com/t/ann-wymeditor-filter/118836/6 "2008-01-29T21:50:38Z")

</div>

Erik van Oosten wrote:

> I just tried this on Safari. But that doesn’t work (nor do they claim  
> it does).  
> A pity because their idea is very good.
> 
> Regards,  
> Erik.

Thanks Erik & David.

Cheers,  
Mohit.  
1/29/2008 | 11:47 AM.

---

<div class="post-metadata">

**Author:** ![jomz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/dfb087/32.png) [@jomz](https://www.ruby-forum.com/u/jomz)\
**Post date:** [January 30, 2008, 7:22pm UTC](https://www.ruby-forum.com/t/ann-wymeditor-filter/118836/7 "2008-01-30T19:22:21Z")

</div>

David P. wrote:

> Has anyone used WYMeditor alongside page\_attachments to get file  
> drag-and-drop as the install instructions claim?
> 
> [SumoCoders, geeks coding with body](http://www.gorilla-webdesign.be/artikel/48-WYM+on+Radiant)

I created a new 0.6.4 project from gem and installed the newest Shards,  
Page\_Attachments, and WYMeditor. I added the following in  
environment.rb…

config.extensions = [ :shards, :page\_attachments, :wym\_editor\_filter,  
:all ]

Things seem to be working well for basic editing, however…

Adding Radius tags seems to be allowed only in the code view, and  
editing these tags is difficult because WYMeditor adds a custom

* * *
 tag  
to support tags appearing in the editor window.

Page\_Attachments drag-and-drop doesn’t work at all for me, with either  
images or other file types. I’m not sure what is supposed to happen when  
both Page\_Attachments and WYMeditor are installed together, but so far  
nothing is different about using Page\_Attachments.

---

<div class="post-metadata">

**Author:** ![jomz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/dfb087/32.png) [@jomz](https://www.ruby-forum.com/u/jomz)\
**Post date:** [January 30, 2008, 7:31pm UTC](https://www.ruby-forum.com/t/ann-wymeditor-filter/118836/8 "2008-01-30T19:31:03Z")

</div>

David P. wrote:

> Page\_Attachments drag-and-drop doesn’t work at all for me, with either  
> images or other file types. I’m not sure what is supposed to happen when  
> both Page\_Attachments and WYMeditor are installed together, but so far  
> nothing is different about using Page\_Attachments.

So the developer says “This gives us the luxury of drag-and-drop image  
inserting”. I’m not using the ruby gems that allow for thumbnail  
generation, so maybe this will work for people who are seeing image  
thumbnails…?

The developer never says anything about other file attachment types, so  
I guess those don’t drag-and-drop either.

---

<div class="post-metadata">

**Author:** ![jomz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/dfb087/32.png) [@jomz](https://www.ruby-forum.com/u/jomz)\
**Post date:** [January 31, 2008, 12:12am UTC](https://www.ruby-forum.com/t/ann-wymeditor-filter/118836/9 "2008-01-31T00:12:22Z")

</div>

woops…  
i answered this to somebody else via regular email, should’ve copied it  
to the list…  
The ‘catch’ is that you first have to activate a container in WYM by  
clicking it, so you get the blinking cursor in there. Now you should be  
able to drop images to it. Beware; any html attributes that were given  
to the page\_attachment thumbnail will also be copied to the wym one.

As for non-image drag & dropping, it works, but not on IE, and you need  
a little tweaking. see [Parked at Loopia](http://pastie.caboo.se/145546) for our  
\_attachment.rhtml.  
You’ll need to finish a bit to your likings, but i’m sure the pastie  
explains everything. The point is that you need a link to drag and drop  
into wym.

IE doesn’t allow you to d&d files because it doesn’t allow to paste  
links into wym. That’s what you do when you d&d a file; you again copy  
the image (file icon) and the tags that it has around it to the  
editor. You can then start typing the link text, and leave or delete the  
icon image.

 

> Adding Radius tags seems to be allowed only in the code view, and  
> editing these tags is difficult because WYMeditor adds a custom
> 
> * * *
> tag  
> to support tags appearing in the editor window.

 

Indeed, you can’t really insert radius through wym. When a page needs  
radius, i switch it back to filter. If the page is mostly radius,  
i leave it like that, if it’s a page that the end user might want to  
edit, i put it back to wym.

 

WYM doesn’t work on safari indeed, but we don’t see that as a problem.  
If we would have any clients on safari, i wouldn’t mind suggesting they  
switch to firefox. It’s still a back-end after all, and wym can be a  
great help to keep the front-end accessible for all browsers.

 

hope that clears things up a bit…

 

rgrds,

 

Benny

---

<div class="post-metadata">

**Author:** ![jomz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/dfb087/32.png) [@jomz](https://www.ruby-forum.com/u/jomz)\
**Post date:** [January 30, 2008, 8:50pm UTC](https://www.ruby-forum.com/t/ann-wymeditor-filter/118836/10 "2008-01-30T20:50:14Z")

</div>

David P. wrote:

> The developer never says anything about other file attachment types, so  
> I guess those don’t drag-and-drop either.

And then it hit me. WYMeditor has buttons for adding links and images,  
so if I simply show a link next to each file, the user can right-click +  
copy the link and paste it into the appropriate WYMeditor pop-up.

In page\_attachments/app/views/admin/page/\_attachment.rhtml add after  
line 7…

 \<%= %Q(link) %\>

It isn’t drag-and-drop, but it works and is a lot more client-friendly  
than having them write their own Radius tags.

The drawback is that you are now saving full URLs (http://…) to the  
database.

---

<div class="post-metadata">

**Author:** ![jomz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/dfb087/32.png) [@jomz](https://www.ruby-forum.com/u/jomz)\
**Post date:** [January 31, 2008, 12:32am UTC](https://www.ruby-forum.com/t/ann-wymeditor-filter/118836/11 "2008-01-31T00:32:37Z")

</div>

Benny D. wrote:

> i answered this to somebody else via regular email, should’ve copied it  
> to the list…

Thanks for the info, Benny. Most of my clients are IE users (with little  
I can do to change that), so I may not be able to use this drag+drop  
magic afterall, but I’ll check out the Pastie regardless.

I’ve been playing with WYMeditor throughout the day and must say I  
really like it. Thanks for all your hard work in bringing it to Radiant.  
I can see my clients really liking it.
