Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
10 views

Telerik.web.ui version 2020.1.219.45 vs the older 2014.2.724.40 DLL.  For  security reasons I must use the newer library.

Using the most basic code below both can display simple HTML.

However, complex HTML like the attached file (rename txt to html) the old DLL displays fine, the newer DLL displays a crazy mess.

The attached HTML also shows fine in browers like Chrome.

I have tried filters such as EditorFilters.ConvertInlineStylesToAttributes, PdfExportFilter.

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

  <telerik:RadEditor ID="RadEditor1" runat="server">         </telerik:RadEditor>

 

Thank you for your advice.

Rumen
Telerik team
 updated answer on 12 Mar 2024
1 answer
17 views

I have a custom drop down in the Telerik Editor.  The ItemsPerRow is not working as all list items <li> are defaulting to full width.  I cannot change the css on my dynamic dropdown without changing also the font dropdown, format dropdown, etc.  How can I add a css class to the drop down in order to apply the CSS just to the custom dropdown?  Any style assigned to the button itself does not apply, as the dropdown code is separate:


I am adding the button dynamically.

I just need to add a display:inline to the list items on my custom drop down to get them to show multiple items per row.

Thanks!

Vasko
Telerik team
 answered on 06 Mar 2024
0 answers
7 views

I have one client who has an issue on her computer on multiple browsers (Edge and Chrome).

About half the time she tries to use the font and size controls, the box floats away from its normal position and when it does this it is non functional.

Any ideas?

Joseph
Top achievements
Rank 1
 asked on 23 Feb 2024
0 answers
12 views

Hi everybody,

I have a problem with dialog.
When I replaced the .ascx files in the "EditorDialogs" folder located in the Telerik.UI installation. I clicked on "Insert Table" then clicked "Cell Properties". I see the Dialog height has been shortened.
Have I updated it wrongly or am I missing something? I hope you can help me.

Thank you very much!

Dai
Top achievements
Rank 1
 asked on 21 Feb 2024
0 answers
48 views

I'm using the following code to create multi-level context menus in a RadEditor control, but I can't get the Text property of the tool to display instead of the Name property. 

 


<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RadEditorForm.aspx.cs" Inherits="RadEditorForm" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <script type="text/javascript">
        //Put your JavaScript code here.
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <div>
        <telerik:RadEditor ID="RadEditor1" runat="server" ToolsFile="RadEditorForm_ToolsFile.xml">
            <ContextMenus>
                <telerik:EditorContextMenu TagName="P">
                    <telerik:EditorTool Name="JustifyLeft"></telerik:EditorTool>
                    <telerik:EditorTool Name="JustifyCenter"></telerik:EditorTool>
                    <telerik:EditorTool Name="JustifyRight"></telerik:EditorTool>
                    <telerik:EditorTool Name="JustifyFull"></telerik:EditorTool>
                </telerik:EditorContextMenu>
                <telerik:EditorContextMenu TagName="BODY">                                    
                    <telerik:EditorTool Name="JustifyLeft"></telerik:EditorTool>
                    <telerik:EditorTool Name="JustifyCenter"></telerik:EditorTool>
                    <telerik:EditorTool Name="JustifyRight"></telerik:EditorTool>
                    <telerik:EditorTool Name="JustifyFull"></telerik:EditorTool>                                                        
                </telerik:EditorContextMenu>
            </ContextMenus>
        </telerik:RadEditor>
    </div>
    </form>
</body>
</html>


using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using System.Data;
using System.Configuration;
using System.Web.Security;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Telerik.Web.UI;

public partial class RadEditorForm : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
        EditorContextMenuTool dataMenu = new EditorContextMenuTool("Data");
        dataMenu.Text = "Data X";
        System.Text.StringBuilder sb = new System.Text.StringBuilder();
        for (int l1 = 0;l1 < 5;l1++)
        {
            EditorContextMenuTool subDataMenu = new EditorContextMenuTool();
            subDataMenu.Name = string.Concat("L",l1,"_Menu");
            subDataMenu.Text = string.Concat("Level 1 Menu Item ",l1);
            subDataMenu.ShowText = true;
            subDataMenu.ShowIcon = false;            
            for (int l2 = 0; l2 < 5; l2++)
            {
                EditorTool tool = new EditorTool();
                tool.Name = string.Concat("L",l1,"_Menu_",l2);
                tool.Text = string.Concat("Level ",l1,"-Menu Item ",l2);
                tool.ShowText = true;
                tool.ShowIcon = false;
                subDataMenu.Tools.Add(tool);
                sb.Append("Telerik.Web.UI.Editor.CommandList[\"" + tool.Name + "\"] = function (commandName, editor, oTool) {debugger;editor.pasteHtml(\"<var>" + tool.Text + "</var>\");}");
                sb.AppendLine();
            }
            dataMenu.Tools.Add(subDataMenu);
        }        
        RadEditor1.ContextMenus.FindByTagName("P").Tools.Add(dataMenu);
        RadEditor1.ContextMenus.FindByTagName("BODY").Tools.Add(dataMenu);
        ScriptManager.RegisterStartupScript(Page, Page.GetType(), "contextMenuHandlerScript", sb.ToString(), true);
    }
}

Jamex
Top achievements
Rank 1
 asked on 01 Sep 2023
0 answers
40 views

I am trying to understand what configuration controls the paragraph style behaviour when enter is hit.

If I have applied any of the "Header 1" to "Header 6" paragraph styles, when I enter, the paragraph style is reset back to normal. The same happens if I use the <address> paragraph style.

However, most of the other paragraph styles do not reset but continue to leave it applied. Any custom paragraph style I add also leave the style applied when enter is hit.

Is there a configuration setting that is applied that determines which paragraph styles are reset and which ones are not when enter is hit?

Steve
Top achievements
Rank 1
 asked on 02 Aug 2023
0 answers
78 views

Using an Editor demo available from the demos, switch to HTML view and paste the following HTML into it:

<div class="row g-3">
<div class="col-6">
<h4>Left column...</h4>
<br />
This selector will match any element that has a class attribute starting with "col-". For example, it will match elements with classes like "col-1", "col-2", "col-header", etc.<br />
<br />
</div>
<div class="col-6"><span>Right column...</span></div>
</div>

Now, switch again to the Design mode.

Try to add some text after the "Right column..." text by placing the cursor in the end of the text, pressing enter and writing something, or just try to change that text format into an H4.

Editor will insert a new paragraph with the col-6 class and outside that DIV!

Here's the result:

<div class="row g-3">
<div class="col-6">
<h4>Left column...</h4>
<br />
This selector will match any element that has a class attribute starting with "col-". For example, it will match elements with classes like "col-1", "col-2", "col-header", etc.<br />
<br />
</div>
<div class="col-6"><span>Right column...</span></div>
<p class="col-6"><span>Just want to add more text...</span></p> --> this should not be here!
</div>

How can this be fixed? Need to provide some snippets but they are unusable this way.

Thank you

Hugo Augusto
Top achievements
Rank 2
Iron
Veteran
Iron
 updated question on 21 Jun 2023
0 answers
50 views

RadEditor is closing the source element that is nested inside the video element . For example, in the attached screen shots show the “source” element which we add it to Rich text field. After we save the Rich Text field and open it again, we see the source element is closed. Is there a configuration setting that would allow us to bypass the closure of the source element?

 

Mike
Top achievements
Rank 1
 asked on 30 May 2023
0 answers
48 views

None of the the stripping options allows me to clean the style tag from this paragraph:

 

<p style="color: #000000; margin: 0cm;">Wondzorg Nijmegen is een samenwerkingsverband tussen A-NIMO, het Canisius-Wilhelmina Ziekenhuis, ATC (Apothekers Thuiszorg Co&ouml;rdinatiecentrum), ZZG Zorggroep en NEO Huisartsenzorg.</p>

I have also tested in your demo environment.

How to achieve this?

 

Marc

 

Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
 asked on 25 Apr 2023
0 answers
51 views

I've download the demo code for the Predefined table styles code, and I noticed that the CSS dropdown isn't limited to the classes in that document. Basically, any class on the page hosting the editor becomes available in there.

So if I add style .aardvark to the head of the page hosting the RadEditor, it becomes the first option in the CSS Dropdown despite it not appearing in TableLayoutCss.css. We have a lot of classes across our application that are applied to every page we render, so we don't want them all appearing in here.

In my case, the HTML users define here is rendered to PDF in the back office by a different tool, so I don't want any classes available for selection in the front end that aren't specifically in TableLayoutCss.css.

Has anyone hit this problem and managed to overcome it or is this expected behaviour of the TableLayoutCssFile option? As things stand, I'm having to tell the users to avoid using the CSS dropdown and go for the 'More Table Styling' button instead, but this clearly isn't as portable a solution as it should be!

Paul
Top achievements
Rank 1
 asked on 18 Apr 2023
Narrow your results
Selected tags
Tags
+? more
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?