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:
Adding a block of HTML Code


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.

 


imegadeals
New User

Feb 18, 2005, 10:28 AM

Post #1 of 2 (8300 views)
Shortcut
Adding a block of HTML Code Can't Post

I love the HTMLAREA product and use it everyday. I have a standard snippet of code that I use quite frequently and would like to setup a button to insert this code in the HTMLAREA. The snippet of code should be placed at the point of cursor without overlaying the existing contents of htmlarea . I created a button which uses the editor_insertHTML function. to insert the code, but because of the special characters in the block of code below, I am unable to get it to work. I am open to any ideas you might have.
----------------------------------------------------------------------------------------------
<input type=button value='Click Here'
onclick='window.open("http://www.imegadeals.com/go.php?url=" +
escape("http://www.msn.com"));'>
----------------------------------------------------------------------------------------------

Thanks, Steve


(This post was edited by imegadeals on Feb 19, 2005, 9:03 AM)


imegadeals
New User

Feb 19, 2005, 8:09 AM

Post #2 of 2 (8264 views)
Shortcut
Re: [imegadeals] Adding a block of HTML Code [In reply to] Can't Post

CoolOK... I figured it out. Here is what I came up with:

var myText = '<input type=button value=' + '"' + 'Click Here' + '"' + 'onclick=' + "'" + 'window.open' + '(' + '"' + 'http://www.imegadeals.com/go.php?url=' + '"' + ' + escape' + '(' + '"' + 'Place Link Here' + '"' + '))' + ';' + "'" + '>';
editor_insertHTML(objname, myText);


(This post was edited by imegadeals on Feb 19, 2005, 9:04 AM)

 
 
 


Search for (options)