Adding a palette

simeon.mattes - June 18, 2009 - 07:09
Project:BUEditor
Version:6.x-1.3
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi there,

I have used bueditor for quite long with a great success. Though I have a problem every time I have to use more advanced buttons, e.g. color palette. For this example I had to create my own palette which I don't think is so great but for basic colors, it works. I attach the code, which though needs improvement. The only thing that somebody has to do is to replace the old bueditor>library>default_buttons_functions.js with the attached one, and call the "create_palette()" function.

I know that I must not change the modules, but I don't have a so advanced level in drupal. I would be obliged for any suggestions.

AttachmentSize
default_buttons_functions.js.txt20.65 KB

#1

sofo - June 24, 2009 - 07:52

function set_color(id)
{
  var sel = BUE.active.getSelection();
  BUE.dialog.close();

  BUE.active.replaceSelection('<span style="color:#'+id+'>'+sel+</span>');

}

BUE.active.replaceSelection('<span style="color:#'+id+'      "     >'+sel+</span>');

#2

simeon.mattes - July 15, 2009 - 09:49

Why have you done this?

 
 

Drupal is a registered trademark of Dries Buytaert.