Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
I want button code for font color and background color for text.
Please help me.
Comments
Comment #1
zincica CreditAttribution: zincica commentedfor 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');
Comment #2
Hipfox CreditAttribution: Hipfox commentedBut 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');
Comment #3
ufku CreditAttribution: ufku commented#176064: Text color button