Hello,
Here are examples on how to fire the RadEditor's dropdowns and splitbuttons commands:
RealFontSize command:
var
args =
new
Telerik.Web.UI.EditorCommandEventArgs(
"RealFontSize"
,
null
,
"13px"
);
editor.fire(
"RealFontSize"
, args);
FontName command:
editor.fire(
"FontName"
, { value:
'Arial'
});
FontSize command:
editor.fire(
"FontSize
"
, {value :
"2"
});
FormatBlock command:
editor.fire("FormatBlock", { value: "<h1>" });
FormatStripper command:
editor.fire("FormatStripper", {value : "WORD"});
- possible values:
ALL, ALL_NO_BRAKES, CSS, SPAN, FONT, WORD, WORD_ALL and WORD_NO_FONTS
ApplyClass command:
var objCssClass = new Object(); objCssClass.get_value = function () { return "HighLight"; } editor.fire("ApplyClass", objCssClass);
BackColor and ForeColor commands:
editor.fire('ForeColor', { value: "orange" });
editor.fire('BackColor', { value: "black" });
Best regards,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their
blog feed now.