htmlArea

A directory of browser-based WYSIWYG editors

  MAIN
INDEX
SEARCH
POSTS
WHO'S
ONLINE
LOG
IN

Home: htmlArea 3 (beta): htmlArea 2 & 3 archive (read only): htmlArea v3.0 - Discussion:
customize toolbar


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.

 


Refosco
Novice

May 6, 2004, 6:22 PM

Post #1 of 8 (1506 views)
Shortcut
customize toolbar Can't Post

Sorry for my english! Unsure

I want customize toolbar, and i have try the solutions in this forum, and they works fine if i use

<body onload='initEditor()'>

But if i want use:

<body onload='HTMLArea.replaceAll()'>

not work! I have try to change:

function initEditor() {
// inititalize editor
editor = new HTMLArea("editor");
// retrive the config object
var config = editor.config;
// add custom configuration
config.toolbar = [ ....[/#008000]

in

function replaceAll() {
// inititalize editor
editor = new HTMLArea("editor");
// retrive the config object
var config = editor.config;
// add custom configuration
config.toolbar = [
.....

but not work!! anyone can help me? thanks in advance! Laugh
----------------------
Refosco @ PHP-Proxima


hubertus
User

May 7, 2004, 2:22 PM

Post #2 of 8 (1485 views)
Shortcut
Re: [Refosco] customize toolbar [In reply to] Can't Post

Hi,

try this:
<body onload='initEditor()'>
with

Code
function initEditor() {  
// inititalize editor
var config = = new HTMLArea.Config();
// add custom configuration
config.toolbar = [ ...[/#008000]

...

HTMLArea.replaceAll(config);
}


Hubertus
----------------------
CMS with HTMLArea (Username: testuser Password: test):
http://www.sundes.de/sundes_wcg/
HTMLArea direct(choose "Textinhalt"):
http://www.sundes.de/cgi-bin/sundes_wcg/egert.pl?layout&kundendir=gastzugang&idlog=RMNaNcMRMcLa2NP

http://www.sundes.de - http://www.hubertus-egert.de


Refosco
Novice

May 7, 2004, 7:09 PM

Post #3 of 8 (1474 views)
Shortcut
Re: [hubertus] customize toolbar [In reply to] Can't Post

Thank you Hubertus...

but, dont work! Unsure

(the editor is not initialised).
----------------------
Refosco @ PHP-Proxima


hubertus
User

May 8, 2004, 3:23 AM

Post #4 of 8 (1469 views)
Shortcut
Re: [Refosco] customize toolbar [In reply to] Can't Post

Hi,

at first there was an error in my post:

Code
var config = = new HTMLArea.Config();

should be

Code
var config = new HTMLArea.Config();

then it could be helpful to post your complete init function and the complete error message.

Hubertus
----------------------
CMS with HTMLArea (Username: testuser Password: test):
http://www.sundes.de/sundes_wcg/
HTMLArea direct(choose "Textinhalt"):
http://www.sundes.de/cgi-bin/sundes_wcg/egert.pl?layout&kundendir=gastzugang&idlog=RMNaNcMRMcLa2NP

http://www.sundes.de - http://www.hubertus-egert.de


Refosco
Novice

May 8, 2004, 4:05 AM

Post #5 of 8 (1467 views)
Shortcut
Re: [hubertus] customize toolbar [In reply to] Can't Post

Oh.. yes... i was correct this, but dont work! Unsure
----------------------
Refosco @ PHP-Proxima


Refosco
Novice

May 12, 2004, 7:06 AM

Post #6 of 8 (1389 views)
Shortcut
Re: [Refosco] customize toolbar [In reply to] Can't Post

Thank you hubertus,

first to post again, i have try to resolve the problem. I have find an error, and now your solution run, but i have others errors:

this is entire file (i have put only the rows that interesting):

---------------------------------------------------------

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<script type="text/javascript">
_editor_lang = "english";
_editor_url = "htmlarea/";
</script>
<!-- load the main HTMLArea files -->
<script type="text/javascript" src="htmlarea/htmlarea.js">
</script>
<script type="text/javascript">
function initEditor() {

var editor = null;
var config = new HTMLArea.Config();
// create a new configuration object
// having all the default values
config.width = 'auto';
config.toolbar = [
[ "fontname", "space",
"fontsize", "space",
"formatblock", "space",
"bold", "italic", "underline", "strikethrough",
"forecolor", "hilitecolor",
"subscript", "superscript", "separator"],
[ "justifyleft", "justifycenter", "justifyright", "justifyfull", "separator",
"orderedlist", "unorderedlist", "outdent", "indent", "separator",
"inserthorizontalrule", "createlink", "insertimage", "inserttable", "separator",
"htmlmode", "popupeditor", "separator", "undo", "redo", "separator",
"copy", "cut", "paste" ] ];

config.fontnames = {
"Arial":
"arial, helvetica, sans-serif",
"Courier New":
"courier new, courier, mono",
"Georgia":
"Georgia, Times New Roman, Times, Serif",
"Tahoma":
"Tahoma, Arial, Helvetica, sans-serif",
"Times New Roman": "times new roman, times, serif",
"Verdana": "Verdana, Arial, Helvetica, sans-serif",
"impact": "impact",
"WingDings": "WingDings"
};

config.fontsizes = {
"1 (8 pt)": "1",
"2 (10 pt)": "2",
"3 (12 pt)": "3",
"4 (14 pt)": "4",
"5 (18 pt)": "5",
"6 (24 pt)": "6",
"7 (36 pt)": "7"
};
HTMLArea.replaceAll(config);
}
</script>
</head>
<body class="screen" onload='initEditor()'>
<table cellspacing="2" cellpadding="2" border="1">
<tr>
<td>
<form action="modules.php?name=Submit_News" method="post">
<br><b>Subject</b><br>
<input type="text" name="subject" size="50" maxlength="80">
<br><b>Story Text:</b><br>
<textarea cols="50" rows="12" name="story"></textarea>
<br><b>Extended Text:</b><br>
<textarea cols="50" rows="12" name="storyext"></textarea>
<input type="submit" name="op" value="Preview">&nbsp;&nbsp;
</form>
</td>
</tr>
</table>
</body>
</html>

--------------------------------------------------------------------

the htmlarea.js is original (no modify) and is placed in folder htmlarea/

I receive now this popup error:

---------------------------------------

[ERROR] CreateSelect

Can't fin the requested doropdown definition

---------------------------------------

and

---------------------------------------

FIXME: Unknow toolbar item: orderedlist

---------------------------------------

for each textarea in script.

Thank you again for your help! Wink
----------------------
Refosco @ PHP-Proxima


hubertus
User

May 12, 2004, 12:02 PM

Post #7 of 8 (1369 views)
Shortcut
Re: [Refosco] customize toolbar [In reply to] Can't Post

Hi,

config.fontname and config.fontsize!
Not:
config.fontnames and config.fontsizes.

Hubertus
----------------------
CMS with HTMLArea (Username: testuser Password: test):
http://www.sundes.de/sundes_wcg/
HTMLArea direct(choose "Textinhalt"):
http://www.sundes.de/cgi-bin/sundes_wcg/egert.pl?layout&kundendir=gastzugang&idlog=RMNaNcMRMcLa2NP

http://www.sundes.de - http://www.hubertus-egert.de


Refosco
Novice

May 12, 2004, 12:38 PM

Post #8 of 8 (1322 views)
Shortcut
Re: [hubertus] customize toolbar [In reply to] Can't Post

I am really stupid!Pirate

Thank you Hubertus for your patience! LaughLaugh

All run now.
----------------------
Refosco @ PHP-Proxima

 
 
 


Search for (options)