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

Unable to insert html in Editor content

7 Answers 146 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Sumaya
Top achievements
Rank 1
Sumaya asked on 09 Oct 2018, 09:03 AM

I'm applying MailMerge example mentioned here in our system

I added code related to custom dropdown only, to test insertion

After selection an option, I just get a title window, like shown in screenshot_1.png attached
here's what shown in debugger, as shown in debugger.png attached. Reading values seems working fine, but the insertion itself doesn't happen, instead that message only shows.
 

Please advise!
Thank you

7 Answers, 1 is accepted

Sort by
0
Sumaya
Top achievements
Rank 1
answered on 09 Oct 2018, 09:30 AM
Btw, I didn't include Preview Window (RadWindow). Is it related?

0
Sumaya
Top achievements
Rank 1
answered on 09 Oct 2018, 09:33 AM
Btw, I didn't include Preview Window (RadWindow). Is it related?

0
Rumen
Telerik team
answered on 09 Oct 2018, 11:48 AM
Hi Sumaya,

As per the screenshot, it looks like there is a problem with the pasteHtml method of RadEditor.

Can you perform a simple test as shown in these examples to see how the pasteHtml method works in your browser:

https://docs.telerik.com/devtools/aspnet-ajax/controls/editor/client-side-programming/methods/pastehtml

<telerik:radeditor runat="server" ContentAreaMode="Div" ID="RadEditor1"></telerik:radeditor>
<input type="button" value="Paste Content" onclick="InsertSpan();return false;" />
<script type="text/javascript">
    function InsertSpan()
    {
        var editor = $find("<%=RadEditor1.ClientID%>"); //get a reference to the editor
        editor.pasteHtml('<span style="width:100px;border: 1px solid red;background-color: blue;color: white;">sample content</span>');
    }
</script>

and 
https://docs.telerik.com/devtools/aspnet-ajax/controls/editor/functionality/toolbars/dropdowns/custom-dropdown

Does the pasted content via the pasteHtml method get inserted in the content area?
Also test in other browsers.

Just for the test replace the pasteHtml method with set_html() and test again.


Best regards,
Rumen
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Sumaya
Top achievements
Rank 1
answered on 09 Oct 2018, 12:59 PM

Hello Rumen,
Thank you for your reply.

I tested on different browsers, with the examples you provided. It only worked through set_html method, which doesn't serve the required need. What do you suggest as a solution, please?

0
Rumen
Telerik team
answered on 09 Oct 2018, 01:09 PM
So far I am not aware of problems with the pasteHtml method, which is one of the main and most popular methods of RadEditor Client-side API.

Which version of RadEditor (Telerik.Web.UI.dll) do you use? Can you upgrade to the latest one 2018.3.910 and test again. You can find upgrade instructions in this article Manual Upgrade.

Best regards,
Rumen
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Sumaya
Top achievements
Rank 1
answered on 09 Oct 2018, 01:23 PM
for the version, please check attachment.
I'll try to upgrade. Thank you Rumen!
0
Rumen
Telerik team
answered on 09 Oct 2018, 01:28 PM
The screenshot shows that you are using version from 2015 which may have compatibility problems with the latest browser versions. That's why please test with 2018.3.910 (R3 2018) and let me know how it behaves.

Kind regards,
Rumen
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Editor
Asked by
Sumaya
Top achievements
Rank 1
Answers by
Sumaya
Top achievements
Rank 1
Rumen
Telerik team
Share this question
or