
|
|
|
|
|
|
|
 | |  |
 |

yvang
New User
Jun 15, 2009, 10:49 AM
Post #1 of 2
(12013 views)
Shortcut
|
|
can't customize toolbar - HTMLArea.I18N is undefined
|
Can't Post
|
|
I have the following javascript in place (which is fully functional and displaying the default toolbar: ---------------------------------------------------- <script type="text/javascript"> <!-- _editor_url = "htmlarea/"; _editor_lang = "en"; //--> </script> <script type="text/javascript" src="htmlarea/htmlarea.js"></script> <script type="text/javascript"> <!-- HTMLArea.loadPlugin("ContextMenu"); HTMLArea.onload = function() { var editor = new HTMLArea("editor"); editor.registerPlugin(ContextMenu); editor.generate(); }; HTMLArea.init(); //--> </script> ---------------------------------------------------- How can I adapt this with so that displays a very mimimal toolbar (ie: boldface, italics, and underline) ? I've tried various different approaches using the examples I found in this forum, . but I get an error message every time .. which is specifically the following: HTMLArea.I18N is undefined How can I adapt my code so that it displays my custom toolbar on load (ie: boldface, italics, and underline) ? Thanks, - Yvan
|
|
|  |
 |

kdhundhara
New User
Aug 7, 2009, 5:34 AM
Post #2 of 2
(8993 views)
Shortcut
|
|
Re: [yvang] can't customize toolbar - HTMLArea.I18N is undefined
[In reply to]
|
Can't Post
|
|
You can use custom tool bar as follows : < script type="text/javascript"> _editor_url = "/htmlarea/"; _editor_lang = "en"; </script> <script type="text/javascript" src="/htmlarea/htmlarea.js"></script> <style type="text/css">.htmlarea { border: 1px solid 00f; }</style> <script type="text/javascript"> HTMLArea.loadPlugin("SpellChecker"); var editor = null; window.onbeforeunload = null; function initHTMLEditor() { editor = new HTMLArea("q1"); var config = editor.config; config.registerButton("pagebreak", "Insert Page Break", "/htmlarea/images/ed_hr.gif", false, // function that gets called when the button is clicked function(editor, id) { editor.insertHTML('<!-- PAGE BREAK -->');}); // formatblock config.toolbar = [[ "fontsize", "space", "bold", "italic", "underline", "separator", "copy", "cut", "paste", "undo", "redo" , "separator", "justifyleft", "justifycenter", "justifyright","justifyfull"] ]; editor.registerPlugin(SpellChecker); editor.generate() ;
return false; } HTMLArea.onload = initHTMLEditor;
</script>
(This post was edited by kdhundhara on Aug 7, 2009, 5:36 AM)
|
|
|  |
 | |  |
|
|