Forum closed. New forum available at


Discuss features, code, contributions, ideas, suggestions, ...
For bugs, patches and feature requests, please post on the Trac:


Postby sehmaschine on Thu Nov 16, 2006 10:06 am

I´ve been playing around with WYMeditor and there are some things I´ve noticed (just from using the demo, so I may be missing something).
we just had a discussion on the jquery mailinglist about an editor and this is why I´m posting here.

- image needs "class" and maybe "dimensions"
- links needs "class" and "target"

- it´d be nice if one could drag & drop the different sections within a document (e.g. drag and drop a paragraph)
- proposal: it´d be great to extend the editor with predefined boxes
one can insert. so, I could build a form-box and the editor could
just drop that box somewhere. of course, it´s important that this box can
´t be dropped anywhere ...

- not so important: the editor could have a better design and it currently takes a lot of space, so it´s hard to implement the editor into a CMS.

- not sure whether this is currently possible: multiple editor on one page (again, thinking about integrating the editor into a CMS).

basically, I really like what you´re doing here.
Posts: 7
Joined: Thu Nov 16, 2006 9:57 am

Postby Enchos on Thu Nov 16, 2006 10:38 am

It would be great to be able to drag and drop images inside floating text and have the right classes added and removed according to the drop position. That way you can drop your image on the left and it stays there, the text floating on the right around it, and vice-versa.

Dragging blocks like paragraphs, lists etc. would be very nice, too.

A very important proposal: Drop the popup windows and use javascript "windows". There is a great window plugin currently in development based on jQuery and Interface. It is themeable and could replaced all those popup windows. It could be positioned tooltip-alike next to an image when changing it's title or alt attributes.

Something else that was mentioned on the jQuery list: Allow to save the current state via ajax. That would allow an author to start and stop editing a document whenever he likes. It would need additonal support from the CMS or whatever, but, for example, Wordpress already supports this in the way that the complete form is submitted and redisplayed.

If you need any help with jQuery: There is a bunch of developers waiting to help you on the jQuery mailing list, you are welcome!

Some small issues concerning your website:
- Add a link back to the homepage from the forum, or better yet, integrate the main navigation into the forum.
- Startpage: Don't use a different color for bold text, that makes it look likee hyperlinks, but they aren't.
- I'd rewrite this sentence "The end-user defines content meaning, [...]" to this: "The end-user can concentrate on rich content, while layout and design are handled via style-sheets."
- Remove whitespace before questionmarks ("[...] management system (CMS) ?" -> "[...] management system (CMS)?")
- "Do you allow you cients to modify their site whith a CMS ?" -> "Do your clients modify content within your CMS?"
- "met de difficult" -> "met the difficult"
- "A short formation and it's the beginning of clean updates made by the end user." <- I have no idea what you are trying to tell me here

- Your documentation page does not contain any documentation: Bad! Please keep in mind that an undocumented feature is no feature!
- I found some more stuff in the "trac wiki": While that is certainly easy to setup, it's really ugly to use for end-users. Please consider using something else for bug tracking and documentation, eg. a different standalone wiki + bugzilla.
Posts: 4
Joined: Thu Nov 16, 2006 10:16 am

Postby jfh on Fri Nov 17, 2006 10:58 am

Welcome sehmaschine and Enchos, it's really great to see you here!

I don't know if you saw it, but I've already started to work on WYMeditor 0.3, which will use jQuery.
I must say that I'm no Javascript Guru (rather a C# coder and a sysadmin), but I try to do my best to write good Javascript code.
Daniel has pointed me jQuery some weeks ago, and I love it!
It helps me to improve my code, and code faster.

Please understand that (currently) lack of time is our major problem. We work full-time for a small web agency in Belgium, which core business is web design and hosting, so we don't have enough time to develop WYMeditor as we'd like (but we do our best!). So, any help is greatly appreciated.

We've read your discussion about WYMeditor on jQuery's mailing-list, and saw you were talking about Drupal.
Two guys from Drupal's community have already started WYMeditor (0.2) integration - it's in early stage, but editing works fine.

About the features you propose: there are really good ideas!
Some features are already present but (as you correctly said) undocumented: you can already apply classes on images, drag & drop elements, and use templates to insert custom predefined elements.

About Trac: we've chosen it because it integrates well with Subversion, ant it works fine. We currently don't use the features/bug tracking system, but we find it OK.
Anyway, we're open to discussion about other solutions.

About the website: thanks for pointing us. As you certainly guessed, English is not our mother language, so if you find other errors, please don't hesitate to report them.

About WYMeditor 0.3: I've chosen to write some code from scratch, for several reasons. One of them was the impossibility to use several WYMeditor instances in the same page.
You can check the current (alpha) status here: ... vinne/0.3/

I'm not sure if the dialog system I've implemented (which replaces popups) is a good solution.
In fact, WYMeditor 0.2 uses popups, otherwise we loose the selection in IE.
Maybe the window plugin you talk about will solve this.

Currently, I'd like to firstly work on basic features: editing must work, adding lists, images, links, tables, classes, copy-paste, and code cleanup. All this in MSIE (from 5.5 to 7) and Gecko.
Compatibility with Opera and Safari would be nice, too.
So, there's much work, and any help (code, testing, documentation, ideas, and so on) would be greatly appreciated.

So, again, thanks for being here.
Last edited by jfh on Tue Nov 21, 2006 11:42 am, edited 1 time in total.
User avatar
Site Admin
Posts: 370
Joined: Sat Sep 23, 2006 8:43 pm
Location: Belgium

Postby Enchos on Mon Nov 20, 2006 8:49 am

Hi Jean!

I just checked out your branch that uses jQuery. I think the Plugin Authoring guide would be a good read for you, it contains mostly everything you need to know to write good jQuery plugins. It's a collection of design patterns that work very well, for example, the option parsing stuff allows a user to override some default settings, instead of all or none.

Let me know if you need any help concerning jQuery.

Posts: 4
Joined: Thu Nov 16, 2006 10:16 am

Postby jfh on Mon Nov 20, 2006 9:38 pm

Actually I did already read the Plugin Authoring guide, but I wasn't sure that it was the best option for me, so I rather started to write a WYMeditor class that I extend with the prototype object.

To write the plugin, I guess I should start like this:

Code: Select all
jQuery.wymeditor = {
   init : function() { ... },
   html : function() { ... },
   iframeHtml : function() { ... },

Am I right?

Apart from the option parsing stuff, what are the other technical benefits for WYMeditor to become a jQuery plugin, instead of simply using jQuery?
What are the pros and cons?

Thanks for your help
User avatar
Site Admin
Posts: 370
Joined: Sat Sep 23, 2006 8:43 pm
Location: Belgium

Postby Enchos on Tue Nov 21, 2006 11:08 am

You should start by writing a plugin method, eg:

jQuery.fn.wymeditor = function(options) {
options = jQuery.extend({
// define defaults
}, options);
// create editor object using options
return this.each(function() {
new Wymeditor(this, options);

That makes the usage pattern easier:
$('.wymeditor').wymeditor({ ... });
Posts: 4
Joined: Thu Nov 16, 2006 10:16 am

Postby jfh on Tue Nov 21, 2006 12:08 pm

OK. It seems to be easier this way. I'll give it a try and keep you informed about my progress.

BTW, some problem with $(...).load: I can't access the iframe's document at the first load, so I can't set its body value.
This is why I had to create the function wym_instance() (wymeditor.js), which returns the current Wymeditor instance, and the onload function (iframe.html), which gets and sets the body innerHTML value.
I don't like this solution, but I didn't found a better one.
Do you have a suggestion?
User avatar
Site Admin
Posts: 370
Joined: Sat Sep 23, 2006 8:43 pm
Location: Belgium

Return to Developers

Who is online

Users browsing this forum: No registered users and 1 guest