ACBox library implements an autocomplete box that can be used in tag completion, function completion or any other auto-complete purposes. When a box triggering string is typed in the textarea, the corresponding ACBox appears at the cursor position. It contains some predefined choices that can be navigated and selected by keyboard or by mouse.

ACBox comes with a predefined box suggesting some HTML tags. Try the demo by typing  

Library files:

  1. bue.autocomplete.js (included in %BUEDITOR/library/bue.min.all.js)
  2. bue.seloffset.js
  3. bue.acbox.js
  4. bue.acbox.css

Documentation:

//Define a new ACBox
E.ACBoxAdd({
 
trigger: BOX_TRIGGERING_STRING,//required. ex: '<'
 
list: ARRAY_OF_AC_STRINGS,//required. ex: ['a>|</a>', 'b>|</b>']
 
delay: MILLISECONDS_BETWEEN_TRIGGER_AND_SHOWUP,//defaults to 800
 
domid: HTML_ID_OF_THE_BOX//not required. you may set an id for the box.
});

//Modify an existing ACBox
E.ACBox[BOX_TRIGGERING_STRING].list = NEW_ARRAY_OF_AC_STRINGS;

//Other methods: E.ACBoxRemove(TRIGGER), E.ACBoxOpen(TRIGGER)

Example template button(tpl: in title) that alters the default ACBox:

js:
BUE.postprocess._myacbox = function(E, $) {
 
E.ACBox['<'].list = ['a href="|"></a>', 'em>|</em>', 'code>\n|\n</code>'];
};

Example template button(tpl: in title) that adds an ACBox for BBCode tags:

js:
BUE.postprocess._myacbox1 = function(E, $) {
 
E.ACBoxAdd({
   
trigger: '[',
    list: [
'url]|[/url]', 'img]|[/img]', 'b]|[/b]', 'i]|[/i]', 'u]|[/u]', 's]|[/s]', 'quote]|[/quote]', 'code]|[/code]', 'color=|][/color]', 'left]|[/left]', 'center]|[/center]', 'right]|[/right]']
  });
 
//Optionally remove the default ACBox
  //E.ACBoxRemove('<');
};

is it not working with drupal

is it not working with drupal 6.19

pls help
i uploaded all files.
and make all setting

Check the page source and

Check the page source and make sure all library files loaded correctly.
Use Firebug if possible.

thank you for reply. can you

thank you for reply.

can you tell me how to use this code ?

//Define a new ACBox
E.ACBoxAdd({
 
trigger: BOX_TRIGGERING_STRING,//required. ex: '<'
 
list: ARRAY_OF_AC_STRINGS,//required. ex: ['a>|</a>', 'b>|</b>']
 
delay: MILLISECONDS_BETWEEN_TRIGGER_AND_SHOWUP,//defaults to 800
 
domid: HTML_ID_OF_THE_BOX//not required. you may set an id for the box.
});

//Modify an existing ACBox
E.ACBox[BOX_TRIGGERING_STRING].list = NEW_ARRAY_OF_AC_STRINGS;

//Other methods: E.ACBoxRemove(TRIGGER), E.ACBoxOpen(TRIGGER)

i am new user, pls help.

thank you its & color button

thank you its & color button working fine now !
there was my mistek :)

hi, this button working fine

hi,

this button working fine wit firefox & google crome but this is not working with IE.

:(

Please use IE7 or later

Please use IE7 or later versions.

does this work with d7? it

does this work with d7? it did not get it to work

I couldn't get it to work in

I couldn't get it to work in D7 either.

Same here. Can't get it to

Same here. Can't get it to work with Drupal 7. I assume, as long as bue.acbox.js and bue.acbox.css are in the Editor path it should just work. Or does a button need to be defined? It's not clear to me from the documentation.

I can confirm this does work

I can confirm this does work on Drupal 7, I just set it up using 7.19.

  • Copy bue.acbox.css, bue.acbox.js and bue.seloffset.js to wherever you have chosen under sites/default/files/...
  • Change the Editor paths to include those three files (using %FILES path)
  • Also in Editor paths, check if you're using the default bue.min.default.js and change to bue.min.all.js
  • Add a template button with the above template button code sample (expand that later), land abel it tpl:ACBox.
  • Click Save configuration button
Under supervision of Drupal :)