This is a migrated thread and some comments may be shown as answers.

radEditor Behavior Question

8 Answers 53 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Gary
Top achievements
Rank 2
Gary asked on 29 Dec 2016, 09:22 PM

I have a question about the behavior of the RadEditor control.

We have a page in our website that contains a RadEditor control.   This page is on two different servers representing two different environments.  Test environment and Production Environment.   The page is the same page in both environments.

Here is the quandary, the RadEditor control is behaving differently on the two servers.

In the test Environment if I type the following into the control:

Test
Test
Test
Test

And then look at the HTML I see:

Test<br />
Test<br />
Test<br />
Test<br />

As I would expect.

However in the Production Environment if I type

Test
Test
Test
Test

Then look at the HTML I see:

< p>Test </p>
< p>Test </p>
< p>Test </p>
< p>Test </p>

I am at a loss as to why the behavior is so different.   Is there some configuration that could be different between the servers / environments?
Why would the control behave differently like this?

Thanks for your help.

Gary Graham

8 Answers, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 30 Dec 2016, 12:05 PM
Hi Gary,

As of Q2 2014 we changed the default value of the Editor's NewLineMode to "P", while in the previous versions its value was "BR". A possible reason for the described behavior could be if your servers are running with different versions of the controls, so the default new line value is different. Configuring it explicitly in the following way should resolve the problem:
<telerik:RadEditor runat="server" NewLineMode="Br"</telerik:RadEditor>

Regards,
Vessy
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Gary
Top achievements
Rank 2
answered on 03 Jan 2017, 09:49 PM
I tried this suggestion and no matter what I set the NewLineMode parameter to ("P", "Br", or "Div") it always inserts a Paragraph Tag
Any other suggestions?
0
Gary
Top achievements
Rank 2
answered on 04 Jan 2017, 05:43 PM

The NewLineMode Only seems to work in FireFox and sometimes in Chrome but never in IE  I am using the latest version or each

Any suggestions?

 

Thanks

Gary

0
Vessy
Telerik team
answered on 06 Jan 2017, 03:14 PM
Hi Garry,

I tested the Editor with the NewLineMode set to "Br" in IE, but it is functioning properly on my side all the time. You can see a video from my test here:
http://www.screencast.com/t/HVgUBqd0Et2Y

Can you share the exact Editor's configuration you are using when the problem occurs? Are you able to isolate the same behavior in a sample project and send it so we can examine the cause for it further?

Regards,
Vessy
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Gary
Top achievements
Rank 2
answered on 09 Jan 2017, 10:47 PM

Here is what I have on the ascx page:

<telerik:RadEditor id="RadEditor1" NewLIneMode="Br" SaveInFile="False" runat="server" Width="100%" Height="1000px" Editable="True" ShowSubmitCancelButtons="false" ToolsFile="~/RadControls/Editor/ToolsFile.xml" StripAbsoluteImagesPaths="false" StripAbsoluteAnchorPaths="false" ></telerik:RadEditor>

Here is what I see in IE 11 when pressing f12:

<div class="RadEditor Default reWrapper" id="ct100_RadEditor1" style="width: 100%; height: 1000px; min-height: 1000px; min-width: 794px;" showsubmitcancelbuttons="false" savefile="false" stripabsoluteanchorpaths="false" stripabsoluteimagepaths="false" editable="true">...</div>

 

notice that the NewLineMode is gone.

0
Vessy
Telerik team
answered on 12 Jan 2017, 01:22 PM
Hi Gary,

I am still not able to replicate the reported issue even with the given configuration. Can you verify that you are using the latest version of the controls like stated in the ticket info (2016.3.1027)?

Also, from the generated html I can see that you are using the Editor in Div content area mode. As this configuration is missing in the provided markup, I assume that you are setting the ContentAreaMode="Div" property in the code behind. Am I correct? If so, are there any other configurations set to the control on the server side?

For convenience I am attaching a sample project I am using for my test - are you experiencing the problem with it? I am testing it with the latest 2016.3.1027 version of the controls in IE11.

Regards,
Vessy
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Gary
Top achievements
Rank 2
answered on 12 Jan 2017, 09:11 PM

Hello Vessy,

 

The example code you sent me works.   I am at a loss as to why the code I am working on does not.

Looking at the Libraries we have for Telerik - it looks like the most recent os 2014 Q3

Looking in the code of the ascx page where the control in question resides I see the following references:

 

Here is all I found in the codebehind:

Imports Telerik.RadEditorUtils
Imports Telerik.WebControls.RadEditorUtils

Protected WithEvents RadEditor1 As Telerik.Web.UI.RadEditor
RadEditor1.Tools.Add(toolbarGroup) ‘ Adds a group of custom buttons

Me.RadEditor1.Content = thisTemplate.Html ‘ fills the editor with saved content


Then in the ascx pager I found the following script section:

<script type="text/javascript">
    //<![CDATA[





    var RadEditor1ClientObject = null;

    /* this code contains the more generic way to resolve the relative reference
    to the custom dialog implementation .aspx file.

    '<%= Page.ResolveClientUrl("~//Apps//CommandCenter//Components/ImagesDialog.aspx") %>'
    */

    Telerik.Web.UI.Editor.CommandList["InsertImage"] = function(commandName, editor, args) {
        RadEditor1ClientObject = editor;
        editor.showExternalDialog(
             '<%= Page.ResolveClientUrl("~//Apps//CommandCenter//Components/ImagesDialog.aspx") %>'
              , null//argument
              , 320
              , 400
              , InsertImageDialogCallback
              , null
              , "Insert Image Dialog", null
              , Telerik.Web.UI.WindowBehaviors.Close
              , false, true);
    };

    Telerik.Web.UI.Editor.CommandList["InsertUrl"] =
     function InsertUrlDialogCommand(commandName, editor, oTool) {
         RadEditor1ClientObject = editor;
         editor.showExternalDialog(
             '<%= Page.ResolveClientUrl("~/Apps/CommandCenter/Components/UriTemplatesDialog.aspx") %>'
              , null//argument
              , 420
              , 350
              , InsertUrlDialogCallback
              , null
              , "Insert URL Dialog", null
              , Telerik.Web.UI.WindowBehaviors.Close
              , false, true);
     };

    Telerik.Web.UI.Editor.CommandList["InsertDefinition"] =
     function InsertUrlDialogCommand(commandName, editor, oTool) {
         RadEditor1ClientObject = editor;
         editor.showExternalDialog(
             '<%= Page.ResolveClientUrl("~/Apps/CommandCenter/Components/DefinitionTemplatesDialog.aspx") %>'
              , null//argument
              , 420
              , 350
              , InsertDefinitionDialogCallback
              , null
              , "Insert Definition Dialog", null
              , Telerik.Web.UI.WindowBehaviors.Close
              , false, true);
     };

    var InsertUrlDialogCallback = function(sender, returnValue) {
        if (returnValue) {
            RadEditor1ClientObject.pasteHtml(returnValue);
        }
    }

    var InsertImageDialogCallback = function(sender, returnValue) {
        if (returnValue) {
            RadEditor1ClientObject.pasteHtml(returnValue);
        }
    }

    var InsertDefinitionDialogCallback = function(sender, returnValue) {
        if (returnValue) {
            RadEditor1ClientObject.pasteHtml(returnValue);
        }
    }

    //]]>
</script>

 

I tried to attach the editor configFile.xml but it will not attach. 

Best,

Gary

0
Vessy
Telerik team
answered on 17 Jan 2017, 01:07 PM
Hi Gary,

I tested the provided configuration with 2014 Q1 but still not able to replicate the problem. I would advice that you open a primary support ticket and provide a runnable sample where the problem can be reproduced, so we can examine it further at our end.

You can see how to prepare such test project here:
http://www.telerik.com/blogs/isolating-a-problem-in-a-sample-project

Regards,
Vessy
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Editor
Asked by
Gary
Top achievements
Rank 2
Answers by
Vessy
Telerik team
Gary
Top achievements
Rank 2
Share this question
or