How to add html string to C1Editor .NET 8?

Posted by: l.balazs on 15 June 2024, 12:12 pm EST

  • Posted 15 June 2024, 12:12 pm EST

    Hello,

    I could not figure out how I can add html text to .NET 8 C1Editor control. Okay, I can load html files, but I need to add say

    <p>Hello C1Editor!</p>
    html string programmatically.

    I checked your CHAT demo. In that demo my answer is added to the C1Editor by calling
    c1EditorView.ReplaceElement(message, _newLineId)
    . It “simply” replaces the
    <span id="NewLine"/>
    tag with the user answer and appends the
    <span id="NewLine"/>
    again.

    Is there a much simpler way to display HTML text in C1Editor?

    For example
    c1Editor.Text += "<span id=\"NewLine\"/>"
    .

    Thanks,

    Louis

  • Posted 18 June 2024, 5:21 am EST

    Hello Louis,

    We have escalated your requirement to the developers to get their insights. Rest assured, we’ll update you once we get necessary information.

    [Internal Tracking ID: C1WIN-32507]

    Regards,

    Uttkarsh.

  • Posted 18 June 2024, 11:33 am EST

    Thanks Uttkarsh!

    Reagrds,

    Louis

  • Posted 12 July 2024, 6:54 am EST

    Hello Louis,

    An enhancement ticket has been created for your request. For now, we do not have ETA for the enhancement but we’ll update you once the feature is available.

    [Enhancement ID: C1WIN-32638]

    As per the developers, the goal of the editor is not to be a full HTML editor. Instead, it is meant to be only a rich-text editor. So they’ll be introducing a generic Insert() method as per the following description of the ticket: “As a developer using the Editor in C1, I want the ability to programmatically insert custom HTML code, so that I can enhance the end-user experience through additional features and customization within the editor.”

    Regards,

    Uttkarsh.

  • Posted 12 July 2024, 8:48 am EST

    Thanks Uttkarsh. I think Insert() will be a nice feature of your C1Editor control.

    Rgards,

    Louis

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels