htmlArea

A directory of browser-based WYSIWYG editors

  MAIN
INDEX
SEARCH
POSTS
WHO'S
ONLINE
LOG
IN

Home: htmlArea 2: htmlArea 2 & 3 archive (read only): htmlArea v2.0:
htmlarea toolbar help


The htmlArea 2 & 3 editors have been discontinued.

We've made these forums available as a read-only reference and knowledge-base for people using or developing editors based on htmlArea 2 or 3.

Anyone who is interested in taking over version 2 or 3 is free to do so. All we ask is that you choose a new name that doesn't have "htmlarea" in it to avoid confusion with this site. We'll even give you a link in the directory to make it easier for people to find you. If you are developing or hosting an htmlArea based-editor under a new name, please submit it to our directory.

 


rgraham
Novice

Jan 21, 2005, 8:44 AM

Post #1 of 9 (3009 views)
Shortcut
htmlarea toolbar help Can't Post

I'm using htmlArea and I was wondering if instead of using the show html button on the toolbar if there was someway to get the same result on a button I have created that won't be on the tool bar. I'm not good with javascript so i would need help coming up with a function that would do exactly what the html button does! I have uploaded a picture of what I'm going to eventually be doing.
Attachments: example.gif (4.37 KB)


theauthor
Novice

Jan 25, 2005, 10:04 AM

Post #2 of 9 (2971 views)
Shortcut
Re: [rgraham] htmlarea toolbar help [In reply to] Can't Post

Create links something like the following:

<a href='javascript:editor_setmode("textareaname","textedit");'>Edit HTML</a>

<a href='javascript:editor_setmode("textareaname","richedit");'>Edit Entry</a>


rgraham
Novice

Jan 25, 2005, 10:08 AM

Post #3 of 9 (2965 views)
Shortcut
Re: [theauthor] htmlarea toolbar help [In reply to] Can't Post

cool thanks for the help! Now is that all i need to do or do I have to set anything up in my editor.js file, or create a function of some sort? Sorry I really don't have much experience in JavaScript Smile


theauthor
Novice

Jan 25, 2005, 10:20 AM

Post #4 of 9 (2961 views)
Shortcut
Re: [rgraham] htmlarea toolbar help [In reply to] Can't Post

That should be all you need. You can test it by simply opening your window with the htmlarea and typing the command beginning with javascript into the address bar of the window. It should work for you. To clarify type 'javascript:editor_setmode("the_name_of_your_text_area_here","textedit");' without the single quotes into the address bar and it should switch the mode of the htmlarea. This is a builtin function of the editor code, the same one used by the internal button that does the same thing.


rgraham
Novice

Jan 25, 2005, 10:24 AM

Post #5 of 9 (2957 views)
Shortcut
Re: [theauthor] htmlarea toolbar help [In reply to] Can't Post

K i figured it out thanks- I have one problem though when I'm clicking on <a href='javascript:editor_setmode("story", "textedit");'>Compose Post</a> this button It is actually going into the richedit mode and then when I click on it again I get this error 'contentWindow.document'is null or not an object

But the richedit button for some reason switchs between the two just fine, unfortunately I just want it to switch just into rich mode when you click that button, any ideas?


theauthor
Novice

Jan 25, 2005, 10:29 AM

Post #6 of 9 (2956 views)
Shortcut
Re: [rgraham] htmlarea toolbar help [In reply to] Can't Post

Give me a URL where you are doing this and I'll see if I can figure out what the problem is.


In Reply To
K i figured it out thanks- I have one problem though when I'm clicking on <a href='javascript:editor_setmode("story", "textedit");'>Compose Post</a> this button It is actually going into the richedit mode and then when I click on it again I get this error 'contentWindow.document'is null or not an object

But the richedit button for some reason switchs between the two just fine, unfortunately I just want it to switch just into rich mode when you click that button, any ideas?



rgraham
Novice

Jan 25, 2005, 10:36 AM

Post #7 of 9 (2953 views)
Shortcut
Re: [theauthor] htmlarea toolbar help [In reply to] Can't Post

k if you go to http://broadcast.power-soft.com then type in test for username and test for pswd. then click on post story. Thanks for the help!


theauthor
Novice

Jan 25, 2005, 11:13 AM

Post #8 of 9 (2946 views)
Shortcut
Re: [rgraham] htmlarea toolbar help [In reply to] Can't Post

The short answer is that you have your links backward. The richedit should go under Compose Post and the textedit should go under Edit HTML. Wacky as that sounds that's the way it should be. The long answer is that while richedit acts as a toggle that will always switch correctly, textedit can only be called if the object is currently in richedit mode. Switching the links should solve the problem functionality wise, although if you click twice on Edit HTML in a row you will get the error (but you will be properly in htmlediting mode so it shouldn't really matter much). Hope this helps.


rgraham
Novice

Jan 25, 2005, 11:25 AM

Post #9 of 9 (2941 views)
Shortcut
Re: [theauthor] htmlarea toolbar help [In reply to] Can't Post

Thanks for all the help!

 
 
 


Search for (options)