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

No automatic <p> mode

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

No automatic <p> mode

Postby dor on Sun Feb 08, 2009 9:37 pm

Hi!

I'm using WYMeditor in my CMS system.
One thing that I want to do with WYMeditor is to design patterns to the user website. I mean that the user would be able to write the XHTML code of his website by himslef, via the web interface.

The WYMeditor is forcing the user to add an inital <p> tag in his content.
This is essential and right, but not for the scenario I described in the first paragraph. (What if the user don't want a <p> tag to wrap all of his XHTML content?)

So, I thought that maybe you'll add an option of "WYMeditor pattern design" mode.
This option may be toggled by the user/programmer (via the WYMedtior interface / JS code).

I appreciate your help,
Dor.
I'm not an English speaker, so sorry for my English mistakes (if there are any) or misunderstanding that caused by my lack of knowledge in English.
dor
 
Posts: 17
Joined: Sun Aug 17, 2008 7:39 pm

Re: No automatic <p> mode

Postby mr_lundis on Fri Feb 20, 2009 5:02 pm

Hi Dor!

I'm not sure I understand what you're trying to do. If the user wants to edit the source directly, why not use the source-code mode of the editor? Writhing source in designMode doesn't make much sense.

Cheers.
Jonatan Lundin - designer, developer and forum moderator. You should follow me on Twitter!
mr_lundis
 
Posts: 335
Joined: Sun Dec 02, 2007 10:59 am
Location: Sweden

Re: No automatic <p> mode

Postby dor on Sun Feb 22, 2009 9:05 pm

Hi!

Thanks for your reply :)


That's because that I want to enable the designMode AND the source-code Mode.

By the way, is it possible to switch automatically (via JS) to source-code Mode with JS when the WYMeditor is being load?

Sometimes I have pages with 3 WYMeditors, and I want that 2 of them would be in designMode, and 1 of them would be in source-code Mode. Is it possible, in the same page?

10X !
I'm not an English speaker, so sorry for my English mistakes (if there are any) or misunderstanding that caused by my lack of knowledge in English.
dor
 
Posts: 17
Joined: Sun Aug 17, 2008 7:39 pm

Re: No automatic <p> mode

Postby eadevel on Mon Feb 23, 2009 11:53 am

Try selecting the corresponding wymeditors:
http://trac.wymeditor.org/trac/wiki/0.5/API#jQuery.wymeditorsi
And then toggle the html source editor:
http://trac.wymeditor.org/trac/wiki/0.5/API#toggleHtml

The example in the manual states what you want for the first editor:
Code: Select all
jQuery.wymeditors(0).toggleHtml();
eadevel
 
Posts: 22
Joined: Thu Sep 27, 2007 12:00 pm


Return to Developers

Who is online

Users browsing this forum: No registered users and 5 guests