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

Feature request: Restrictive mode

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

Feature request: Restrictive mode

Postby orbi on Fri Mar 30, 2007 7:43 pm

Hi,
first of all: Just tried the WYMeditor and I love it. It's the best editor I've seen so far!

I have a suggestion: Can you implement a (configurable) mode in which users have to start with h1 and can't do unlogical jumps (e.g. from h2 to h4 - they should always have a h3 before a h4)?
Is it possible?

thanks!
orbi
orbi
 
Posts: 3
Joined: Fri Mar 30, 2007 7:35 pm

Postby jfh on Thu Apr 05, 2007 2:52 pm

Hi orbi, thanks for your encouragements :)

'Restrictive mode' would be possible (IMO) using a XML schema or Relax NG at the server-side, and validating WYMeditor's content against it while editing.
I guess it's the easier way to do what you want.

We're planning a 'Selection API' and a rock-solid event handler for 0.4, so it will be possible (well, I hope so) to not only validate the content, but also to automagically 'populate' the editor with a semantic/logical structure while editing, using e.g. AJAX techniques.

Example:
- the user starts to edit a document: WYMeditor automagically transforms the first P by H1
- the user has finished to enter his heading, he presses 'return': WYMeditor automagically inserts a H2
- the user has finished to enter his H2, he presses 'return': WYMeditor inserts a P with a particular class
- and so on...

I think that would be great. :)
User avatar
jfh
Site Admin
 
Posts: 370
Joined: Sat Sep 23, 2006 8:43 pm
Location: Belgium

Postby Bon Bon on Sun Apr 15, 2007 12:15 pm

To be honest I don't think WYMeditor should do this at all, the primary purpose of the editor should be the main consideration and that is to allow the user to do what they want how they want opposed to forcing them to stick to <h1><h2> even if implied.

The reason behind this is sometimes it makes more sense not to start with <h1> or <h1>blah</h1><h2>section1</h2> because what if they wanted to include an introduction, or navigation before the page starts?

If you were to do something like this would it not be better to include it as a plugin for the first release of it to see how people respond to it?
Bon Bon
 
Posts: 5
Joined: Fri Mar 02, 2007 12:16 pm

Postby dixon_ on Sun Apr 15, 2007 8:37 pm

Completely agree with Bon Bon.

WYMeditor will be integrated in lots of different applications and situations, so flexibility must be prioritised. There for I don't think "restrictive mode" is something for the core of WYMeditor.

But I do think that WYMeditor shall provide a solid platform for possibilities like this, so the CMS developer (or what ever) can write plugins that corresponds with their demands. And it is here that the new integration with jQuery will play an important role, I guess.
dixon_
 
Posts: 7
Joined: Fri Mar 16, 2007 10:30 pm

Postby orbi on Fri Apr 20, 2007 10:16 am

hi,
I made the experience that you have to force people to write sementically correct text. So I really appreciate jfhs thoughts!

Whether this should implemented in the core or as plugIn ... hm, mainpoint is that it works :)

g
orbi
orbi
 
Posts: 3
Joined: Fri Mar 30, 2007 7:35 pm


Return to Developers

Who is online

Users browsing this forum: No registered users and 2 guests