Print Page | Close Window

Appending HTML to textarea value

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Rich Text Editor (RTE)
Forum Description: Support forum for the Web Wiz Rich Text Editor (RTE).
URL: https://forums.webwiz.net/forum_posts.asp?TID=21443
Printed Date: 29 March 2026 at 10:25am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Appending HTML to textarea value
Posted By: pjodoin
Subject: Appending HTML to textarea value
Date Posted: 29 September 2006 at 6:18pm
Hi,
 
In the current page, there is an editable DIV area acting as a textarea for user input:
 
<div id="DocContent" contenteditable><%=strContent%></div>
 
and there is a button on this page to open up a new window for user to append some text to the DIV area. So on the new window page, I have some javascript to do the job:
 
window.opener.DocContent.innerHTML=window.opener.DocContent<%= controlName%>.innerHTML + "text to be appended";
 
Now we would like to replace the DIV area by the RTE textarea, is there any way to do the same thing and append the text to the RTE textarea value?



Replies:
Posted By: WebWiz-Bruce
Date Posted: 30 September 2006 at 2:20am
Scrap the editable DIV area, turn it into a regular textarea and then apply the RTE to it.

-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: pjodoin
Date Posted: 02 October 2006 at 2:34pm
we have done that sucesfully, except that after we do that, we can no longer dynamically insert links into that same textarea.  SInce we must be able to insert links in that area, we were wondering if you had any ideas on how to incorporate both
Thanks


Posted By: WebWiz-Bruce
Date Posted: 02 October 2006 at 11:46pm
See this post might help, if not have a look through some of the others in teh forum:-

http://forums.webwiz.net/forum_posts.asp?TID=21391


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: pjodoin
Date Posted: 03 October 2006 at 3:13pm
No luck. I try to put
window.opener.document.getElementById('MyRTE').contentWindow.document.body.innerHTML = window.opener.document.getElementById('MyRTE').contentWindow.document.body.innerHTML + "Text to append";
 
but it doesn't update the content in the RTE.
 
Thanks,
Paul


Posted By: WebWiz-Bruce
Date Posted: 04 October 2006 at 10:12am
This would need to be run after the RTE has loaded.

-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net