or
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" /> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" > <AjaxSettings> <telerik:AjaxSetting AjaxControlID="btnAddItem"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="tvProjectSummary" LoadingPanelID="RadAjaxLoadingPanel1"> </telerik:AjaxUpdatedControl> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Width="270px" BackgroundPosition="Center" Skin="Outlook" EnableSkinTransparency="true"> </telerik:RadAjaxLoadingPanel> <telerik:RadTreeView ID="tvProjectSummary" runat="server" AllowNodeEditing="true" EnableDragAndDrop="true" Skin="Metro" OnClientNodeDropping ="SaveCtrlState" OnNodeDrop="HandleDrop"> <Nodes> <telerik:RadTreeNode Value="Root" ImageUrl="Images/subfolder_button.png" AllowEdit="true" Text="NEW PROJECT" Font-Bold="true" Selected="true"> </telerik:RadTreeNode> </Nodes> </telerik:RadTreeView> <asp:Repeater ID="rptItems" runat="server" OnItemCommand="rptItems_ItemCommand"> <ItemTemplate> <ul class="options_items"> <li> <asp:Label ID="lblItems" runat="server" Text="<%# Container.DataItem %>"></asp:Label> <asp:LinkButton ID="btnAddItem" runat="server" CommandName="AddItem" >Add+</asp:LinkButton> </li> </ul> </ItemTemplate> </asp:Repeater>We are able to declare a custom styles list correctly. The issue that we have is when we apply a custom style to a selection the RadEditor defaults to wrapping the selection in "Font" tags. We want it to wrap in "Div" tags, instead.
Given the following HTML code, before applying styles:
<p>my text document looks kind of like this. And sometimes I highlight a whole tag like this:</p> <p>MY HEADER</p> <p>or maybe I highlight text INSIDE OF THIS P TAG and turn it into a subparagraph.</p><p>my text document looks kind of like this. And sometimes I highlight a whole tag like this:</p> <p class="section header">MY HEADER</p> <p>or maybe I highlight text <FONT class="section subparagraph">INSIDE OF THIS P TAG</FONT> and turn it into a subparagraph.</p> <p>my text document looks kind of like this. And sometimes I highlight a whole tag like this:</p> <div class="section header">MY HEADER</div> <p>or maybe I highlight text <div class="section subparagraph">INSIDE OF THIS P TAG</div> and turn it into a subparagraph.</p> <!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title></head><body> <form id="form1" runat="server"> <telerik:RadScriptManager runat="server" ID="RadScriptManager1" /> <div> <telerik:RadContextMenu runat="server" ID="ctx"> <Targets> <telerik:ContextMenuElementTarget ElementID="test" /> </Targets> <Items> <telerik:RadMenuItem Text="Item 1" /> <telerik:RadMenuItem Text="Item 2" /> <telerik:RadMenuItem IsSeparator="true" /> <telerik:RadMenuItem Text="Item 3" /> <telerik:RadMenuItem Text="Item 4"> <Items> <telerik:RadMenuItem Text="Item 5" /> <telerik:RadMenuItem Text="Item 6" /> </Items> </telerik:RadMenuItem> </Items> </telerik:RadContextMenu> <div id="test" style="width: 300px; height: 300px; background-color: red"> Right click here! </div> </div> </form></body></html>function openAddPeriodeDialog() { var Rad = $find('<%=RadWindowAddPeriode.ClientID%>'); Rad.show();}Dim AnneeFinanciere As String = DirectCast(e.Item, GridDataItem).Item("AnneeFinanciere").TexttxbAnneFianciere.Text = AnneeFinancierepanelTypePeriode.Visible = FalseRadGridIntervalle.DataSource = ObjPeriodeComptableController.GridInsertSelect(AnneeFinanciere)RadGridIntervalle.Rebind()<telerik:AjaxSetting AjaxControlID="TemplateColumn"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadWindowAddPeriode" /> </UpdatedControls> </telerik:AjaxSetting>