Although BUEditor is a Drupal project, it is also avaliable to be used in non-drupal sites or in Drupal without enabling it as a module.

To run BUEditor in a page, you should:

  1. Include bueditor.css as a stylesheet
  2. Include bueditor.js and optionally js files in library folder to use the functions defined by them.
  3. define editor.path (editor folder path relative to the page)
  4. define editor.buttons (an array including editor buttons.)
  5. assign the class name "editor-textarea" to any textarea that should be processed. You can also use editor.processTextarea(T) method any time, where the T is the textarea object

editor.buttons is an array of arrays having the structure;
editor.buttons = [ [button-1], [button-2], ..., [button-N] ];
and each button is an array consisting of title, content, icon(caption), accesskey in order.
editor.buttons = [ [title-1, content-1, icon-1, key-1], ..., [title-N, content-N, icon-N, key-N] ];

An example page header to run BUEditor:

<style type="text/css" media="all">@import "bueditor/bueditor.css";</style>
<
script type="text/javascript" src="bueditor/bueditor.js"></script>
<
script type="text/javascript" src="bueditor/library/default_buttons_functions.js"></script>
<
script type="text/javascript">
editor.path = 'bueditor/';//required for displaying the icons in icons folder.
editor.buttons = [
  [
'Bold', '<strong>%TEXT%</strong>', 'bold.png', 'B'], //Bold
 
['Italic', '<em>%TEXT%</em>', 'italic.png', 'I'], //Italic
 
['Preview', 'js: eDefPreview();', 'Preview', 'P'] //Preview
];
<
/script>

In 6.x BUE.templates was introduced which contains all buttons and icon path information. Here is an example:

<style type="text/css" media="all">@import "bueditor/bueditor.css";</style>
<
script type="text/javascript" src="bueditor/bueditor.js"></script>
<
script type="text/javascript" src="bueditor/library/default_buttons_functions.js"></script>
<
script type="text/javascript">
BUE.templates.editor1 = {//templates allow us to use different editor interfaces for different textareas.
 
iconpath: 'bueditor/icons',
 
buttons: [
   [
'Bold', '<strong>%TEXT%</strong>', 'bold.png', 'B'], //Bold
  
['Italic', '<em>%TEXT%</em>', 'italic.png', 'I'], //Italic
  
['Preview', 'js: eDefPreview();', 'Preview', 'P'] //Preview
 
]
};
BUE.preset.push(['any_textarea_id', 'editor1']);//set textarea-template pairs
</script>

Under supervision of Drupal :)