I would like to do some changes to the RichTextEditorRibbonBar's style gallery like changing the "Normal" style and adding/deleting new/existing styles.
How can I do it programmatically?
Thanks.
1 Answer, 1 is accepted
0
Hristo
Telerik team
answered on 11 Mar 2016, 04:14 PM
Hello ,
Thank you for writing.
In order to accomplish your task, you would need to work with the StyleRepository object exposed by the RadDocument class. Detailed information is available in the following documentation article: RadRichTextEditor | Styles.
Please also check my code snippet below demonstrating how you can create a new style and modify an existing one:
// Add a new style
StyleDefinition charStyle = new StyleDefinition();
charStyle.Type = StyleType.Character;
charStyle.SpanProperties.FontFamily = new Telerik.WinControls.RichTextEditor.UI.FontFamily("Calibri");