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:
ReplaceAll with custom config.js


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.

 


Bomber
New User

Jan 30, 2005, 2:54 AM

Post #1 of 1 (3061 views)
Shortcut
ReplaceAll with custom config.js Can't Post

I use the onload='HTMLArea.replaceAll()' but i cant get it to load my custom config.js file... I kind of a nOOb i Javascript so it might just be an oversigt/misunderstanding...

The INDEX file looks like this:


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


<BODY TOPMARGIN="0" onload='HTMLArea.replaceAll()'>



the CONFIG.JS file looks like this:


Code
 var editor = null; 
HTMLArea.loadPlugin("ContextMenu");
HTMLArea.loadPlugin("TableOperations"); function initEditor()
{
editor = new HTMLArea("cont");

var cfg = editor.config; // this is the default configuration


//// SETTINGS /////


//new buttons
cfg.registerButton("uploadimage", "Upload image", "../../../htmlarea/images/up_image.gif", false,
function(upload)
{
if (screen.width > 800)
{
l = 340;
t = 200;
}
else
{
l = 210;
t = 120;
}
window.open('../../../htmlarea/popups/upload_image.php', 'upload' ,'left='+l+', top='+t+', width=300 , height=200','menubar=no');
} );

// set your toolbar
cfg.toolbar = [
[ "fontname", "space",
"fontsize", "space",
"formatblock", "space",
"bold", "italic", "underline", "separator",
"copy", "cut", "paste", "space" ],

[ "justifyleft", "justifycenter", "justifyright", "justifyfull", "separator",
"insertorderedlist", "insertunorderedlist", "outdent", "indent", "separator",
"forecolor", "hilitecolor", "separator",
"inserthorizontalrule", "createlink", "insertimage", "uploadimage", "inserttable", "htmlmode", "separator" ]
];


// Editor style
cfg.pageStyle = "body {background-color: #ffffff; font-family: Verdana; font-size:13px; }";


// generate editor
editor.registerPlugin(ContextMenu);
editor.registerPlugin(TableOperations);



editor.generate();
}



When i run the InitEditor() it works fine... but now i have start using TPL for PHP and since that it only works on replaceAll().

But how do i load my config.js file, when i user replaceAll()????

 
 
 


Search for (options)