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:
Init Errors Need urgent help please m8s!


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.

 


dagcrack
New User

Jul 22, 2004, 11:31 AM

Post #1 of 2 (2668 views)
Shortcut
Init Errors Need urgent help please m8s! Can't Post

Lo m8s, I just can't figure out why htmlarea 3.0 gives me init errors, heres my init code:








Code
 if (file_exists("htmlarea/htmlarea.js")) { echo" 

<script type=\"text/javascript\">
_editor_url = \"htmlarea/\";
_editor_lang = \"en\";
</script>





<!-- load the plugins -->
<script type=\"text/javascript\">
// WARNING: using this interface to load plugin
// will _NOT_ work if plugins do not have the language
// loaded by HTMLArea.



// In other words, this function generates SCRIPT tags
// that load the plugin and the language file, based on the
// global variable HTMLArea.I18N.lang (defined in the lang file,
// in our case \"lang/en.js\" loaded above).



// If this lang file is not found the plugin will fail to
// load correctly and nothing will work.



HTMLArea.loadPlugin(\"TableOperations\");
HTMLArea.loadPlugin(\"SpellChecker\");
HTMLArea.loadPlugin(\"FullPage\");
HTMLArea.loadPlugin(\"CSS\");
HTMLArea.loadPlugin(\"ContextMenu\");
</script>




<!-- load the main HTMLArea file, this will take care of loading the CSS and
other required core scripts. -->
<script type=\"text/javascript\" src=\"../htmlarea.js\"></script>







<style type=\"text/css\">
html, body {
font-family: Verdana,sans-serif;
background-color: #fea;
color: #000;
}
a:link, a:visited { color: #00f; }
a:hover { color: #048; }
a:active { color: #f00; }



textarea { background-color: #fff; border: 1px solid 00f; }
</style>



<script type=\"text/javascript\">
var editor = null;
function initEditor() {



// create an editor for the \"ta\" textbox
editor = new HTMLArea(\"ta\");



// register the FullPage plugin
editor.registerPlugin(FullPage);



// register the SpellChecker plugin
editor.registerPlugin(TableOperations);



// register the SpellChecker plugin
editor.registerPlugin(SpellChecker);



// register the CSS plugin
editor.registerPlugin(CSS, {
combos : [
{ label: \"Syntax:\",
// menu text // CSS class
options: { \"None\" : \"\",
\"Code\" : \"code\",
\"String\" : \"string\",
\"Comment\" : \"comment\",
\"Variable name\" : \"variable-name\",
\"Type\" : \"type\",
\"Reference\" : \"reference\",
\"Preprocessor\" : \"preprocessor\",
\"Keyword\" : \"keyword\",
\"Function name\" : \"function-name\",
\"Html tag\" : \"html-tag\",
\"Html italic\" : \"html-helper-italic\",
\"Warning\" : \"warning\",
\"Html bold\" : \"html-helper-bold\"
},
context: \"pre\"
},
{ label: \"Info:\",
options: { \"None\" : \"\",
\"Quote\" : \"quote\",
\"Highlight\" : \"highlight\",
\"Deprecated\" : \"deprecated\"
}
}
]
});



// add a contextual menu
editor.registerPlugin(\"ContextMenu\");



// load the stylesheet used by our CSS plugin configuration
editor.config.pageStyle = \"@import url(custom.css);\";



setTimeout(function() {
editor.generate();
}, 500);
return false;
}



function insertHTML() {
var html = prompt(\"Enter some HTML code here\");
if (html) {
editor.insertHTML(html);
}
}
function highlight() {
editor.surroundHTML('<span style=\"background-color: yellow\">', '</span>');
}
</script>";



}




The error i'm getting is:

Line 258
Char 3
"HTMLArea" is undefined




Can someone help me please? I really REALLY need help from you, please.

Thanks in advice,
dagcrack


morris
Novice

Feb 9, 2005, 5:41 PM

Post #2 of 2 (2308 views)
Shortcut
Re: [dagcrack] Init Errors Need urgent help please m8s! [In reply to] Can't Post

try removing all your backslashes

 
 
 


Search for (options)