A directory of browser-based WYSIWYG editors


Home: htmlArea 3 (beta): htmlArea 2 & 3 archive (read only): htmlArea v3.0 - Discussion:
display added text

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.


New User

Jan 14, 2005, 4:24 PM

Post #1 of 1 (2284 views)
display added text Can't Post

Hi! I badly need help.

In addition to the user typing in text to the htmlarea, I have a button that adds some more text. I am able to retrieve whatever was added through the button but I do not know how to display that added text to the htmlarea. How do I do this?

Below is a snippet of my code:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

<html xmlns="" xml:lang="en" lang="en">

<title>VITAL - Bin</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />

<script type="text/javascript" language="javascript">
_editor_url = "../admin/htmlarea/";
_editor_lang = "en";
<script language="javascript" type="text/javascript" src="../admin/htmlarea/htmlarea.js"></script>

<script type="text/javascript" language="javascript">

function submitStuff() {
<form name="AddToEssayForm" method="post">
<input type="button" name="cbAddVideo" value="add" class="button" onClick="AddVideo()">
<a class="actionbutton" href="javascript:submitStuff()"> SUBMIT</a>
<textarea id="taEssay" name="taEssay" rows="15" cols="50"></textarea>

<script type="text/javascript">
var config = new HTMLArea.Config();
config.editorURL = '/htmlarea/';

var mytext = '';
var essayEditor = new HTMLArea("taEssay", config);

function AddVideo() {
essayEditor._textArea.value =essayEditor.getHTML();
var token = " my choice";
essayEditor._textArea.value += token;
mytext = essayEditor._textArea.value;
document.AddToEssayForm.taEssay.value = mytext;


Basically, when the user clicks on the add button, the function "AddVideo" assigns to "mytext" all the text within the htmlarea and the text added through the add button. I want to display everything in "mytext" into the htmlarea for the user to view.

Also, I would appreciate suggestions of a better way to implement this.


Min Unsure


Search for (options)