Hello,

I want button code for font color and background color for text.

Please help me.

Comments

zincica’s picture

for backgroun color:
js:
var form = [
{name: 'style', title: 'background color', type: 'select', options: {'': '', 'background-color:red;': 'red', 'background-color:green;': 'green', 'background-color:blue;': 'blue', 'background-color:black;': 'black'}},
];
eDefTagDialog('font', form, 'Background color', 'Ok');

for font color:

js:
var form = [
{name: 'color', title: 'Font color', type: 'select', options: {'': '', red: 'red', blue: 'blue', green: 'green'}},
];
eDefTagDialog('font', form, 'Fon color', 'Ok');

Hipfox’s picture

But the font element is not supported in XHTML 1.0 Strict DTD. Use styles (instead of the tag) to define the font face, font size, and font color of text.

js:
var form = [
{name: 'style', title: 'Font color', type: 'select', options: {'': '', 'color:red;': 'red', 'color:blue;': 'blue', 'color:green;': 'green'}},
];
eDefTagDialog('span', form, 'Font color', 'Ok');

ufku’s picture

Status: Active » Closed (duplicate)