Print Page | Close Window

Field returns original text and not RTE txt

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=25731
Printed Date: 29 March 2026 at 2:09pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Field returns original text and not RTE txt
Posted By: macmahoooon
Subject: Field returns original text and not RTE txt
Date Posted: 16 May 2008 at 1:36pm
Have implemented the RTE on one of my pages, and have tried several different methods of retrieving the contents to be returned to other fields, but seems it always returns the text which was prepopulated into the textarea, and not the edited version from the RTE.  Does the text always have to be submitted from the form first?



Replies:
Posted By: WebWiz-Bruce
Date Posted: 16 May 2008 at 2:09pm
Normally yes, however, have a look at how the 'Preview' button works. It takes the present content of the RTE area and places it into a hidden form field to be read in like a normal form field.

The onclick javascript used to do this is:-

onClick="document.getElementById('pre').value = document.getElementById('WebWizRTE').contentWindow.document.body.innerHTML;"


The part below is the bit that gets the RTE areas content:-

document.getElementById('WebWizRTE').contentWindow.document.body.innerHTML;


-------------
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: macmahoooon
Date Posted: 16 May 2008 at 2:27pm
Exactly what I needed.  Thanks for the quick response    



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