Unable to insert html in Editor content

8 posts, 0 answers
  1. Sumaya
    Sumaya avatar
    7 posts
    Member since:
    Feb 2018

    Posted 09 Oct 2018 Link to this post

    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
  2. Sumaya
    Sumaya avatar
    7 posts
    Member since:
    Feb 2018

    Posted 09 Oct 2018 Link to this post

    Btw, I didn't include Preview Window (RadWindow). Is it related?

  3. Sumaya
    Sumaya avatar
    7 posts
    Member since:
    Feb 2018

    Posted 09 Oct 2018 Link to this post

    Btw, I didn't include Preview Window (RadWindow). Is it related?

  4. Rumen
    Admin
    Rumen avatar
    14459 posts

    Posted 09 Oct 2018 Link to this post

    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.
  5. Sumaya
    Sumaya avatar
    7 posts
    Member since:
    Feb 2018

    Posted 09 Oct 2018 in reply to Rumen Link to this post

    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?

  6. Rumen
    Admin
    Rumen avatar
    14459 posts

    Posted 09 Oct 2018 Link to this post

    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.
  7. Sumaya
    Sumaya avatar
    7 posts
    Member since:
    Feb 2018

    Posted 09 Oct 2018 in reply to Rumen Link to this post

    for the version, please check attachment.
    I'll try to upgrade. Thank you Rumen!
  8. Rumen
    Admin
    Rumen avatar
    14459 posts

    Posted 09 Oct 2018 Link to this post

    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.
Back to Top