Print Page | Close Window

RTE MOD *Access Multiple RTE per page*

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


Topic: RTE MOD *Access Multiple RTE per page*
Posted By: bootcom
Subject: RTE MOD *Access Multiple RTE per page*
Date Posted: 13 April 2005 at 9:29am

For the portal I'm currently building, I needed on some of my pages to have up to 3 RTE editors which obviously isn't possible so I created myself a little MOD to do this with, it doesn't show the editors on the page, it shows the textareas, which can call the editors using a link or even using an onclick attribute on the textarea, and then shows a popup with the editor in.

On the page you are wanting your multiple RTE editors put the following JS function in the head tag of the page.
 

 
// function to show RTE Editor for advanced textarea editing
function doTheAdvancedTextAreaEditing(formName, textAreaID){
// ok we now need to open a pop up window to show the RTE Editor
window.open('/portal/RTE/advanced_text_area.asp?strFormName='+ formName +'&strTextAreaID='+ textAreaID +'', 'advancedTextAreaRTE', 'width=700, height=600, scrollbars=1, status=1')
}
 
 
Now here is the code for the advanced_text_area.asp page
 

 
<%
Dim strFormName

Dim strTextAreaName

'Edit the intilised variables below to put in the name of your textrea's ID and the name
'of the form the textarea is within

'Name of the HTML form the textarea is within
strFormName = request.QueryString("strFormName")

'ID tag name of HTML textarea being replaced
strTextAreaName = request.QueryString("strTextAreaID")
%>
 
<html>
 
<head>
 
<script language="javascript">

function giveTheTextAreaAValue(){
// Populate the textarea with the value from the opener textarea

document.forms.<%= strFormName %>.textarea.value = window.opener.document.forms.<%= strFormName %>.<%= strTextAreaName %>.value

}
 
function updateTextAreaAndCloseMe(){

// first of all update the text area in the window opener

window.opener.document.forms.<%= strFormName %>.<%= strTextAreaName %>.value = document.getElementById('WebWizRTE').contentWindow.document.body.innerHTML

// Now that we have updated the opener with the formatted HTML code we can now close this window.
window.close()
}
</script>
 
<!--#include file="RTE_configuration/browser_page_encoding_inc.asp" -->
 
</head>
 
<body OnLoad="giveTheTextAreaAValue();initialiseWebWizRTE();">
 
<form name="<%= strFormName %>">    
      
<!-- include the Web Wiz Rich Text Editor -->
<!--#include file="RTE_editor_inc.asp" -->
      
<textarea name="textarea" cols="80" rows="15" id="<%= strTextAreaName %>"></textarea>
         
<input type="button" name="Submit" value="Update" onClick="updateTextAreaAndCloseMe()">

<input name="reset" type="reset" value="Reset Form">
        
</form>
     
</body>
 
</html>
 
 



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