how to applying custom styles to format block in sitefinity 4.o ?
hi,
how to applying custom styles to format block in sitefinity 4.o ?
i am using sitefinity 4.0 rc
in
sitefinity 3.7 we simply change in EditorToolsFile.xml file. but how can we do
in sitefinity 4.o ?
i will saw the following link
www.sitefinity.com/.../add-custom-css-classes-to-radeditor-for-content-block.aspx
i did according to above link instruction. but i t was not working.below is the my code .please correct me where was i wrong .
class ContentBlockCustom
using System.Web;using Telerik.Sitefinity.Modules.GenericContent.Web.UI;using Telerik.Sitefinity.Web.UI.ControlDesign;/// <summary>/// Summary description for ContentBlockCustom/// </summary>[ControlDesigner(typeof(ContentBlockDesignerCustom))]public class ContentBlockCustom:ContentBlock protected override string LayoutTemplateName get return "~/controls/MyConetBlock/MyContentBlock.ascx"; using System;using System.Collections.Generic;using System.Linq;using System.Web;using Telerik.Sitefinity.Modules.GenericContent.Web.UI;/// <summary>/// Summary description for ContentBlockDesignerCustom/// </summary>public class ContentBlockDesignerCustom : ContentBlockDesigner protected override string LayoutTemplateName get return "~/controls/MyConetBlock/MyContentBlock.ascx"; <%@ Control Language="C#" AutoEventWireup="true" CodeFile="MyContentBlock.ascx.cs" Inherits="controls_MyConetBlock_MyContentBlock" %><%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI" TagPrefix="sf" %><%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI.Fields" TagPrefix="sf" %> <asp:Literal ID="contentHtml" runat="server"></asp:Literal><sf:ResourceLinks id="resourcesLinks" runat="server"> <sf:ResourceFile Name="~/App_Data/Sitefinity/WebsiteTemplates/YourTemplate/App_Themes/YourTheme/Black Yellow/EditorStyleCss/editor_styles.css" /> </sf:ResourceLinks> <sf:FormManager ID="formManager" runat="server" /> <div style="width: 660px; overflow: hidden;"> <sf:HtmlField ID="htmlEditor" runat="server" Width="99%" Height="370px" EditorContentFilters="DefaultFilters" EditorStripFormattingOptions="MSWord,Css,Font,Span,ConvertWordLists" DisplayMode="Write"> </sf:HtmlField> </div> <script type="text/javascript"> $("body").addClass("sfContentBlockDesigner"); </script>Hello Björn,
You can map the template of the GontentBlock designer from Sitefinity's configuration ( take a look at attached screenshot) and then set the property of theHtmlField control.
Kind regards,
Ivan Dimitrov
the Telerik team