C1editor .Net 8 How to insert multiple Lines of Text at Selection

Posted by: work on 14 August 2025, 6:38 pm EST

  • Posted 14 August 2025, 6:38 pm EST

    With C1Editor I want to be able to insert multiple lines of text with a carriage return where the cursor is in the document. I cant figure out how to do this.

    If I simply do the following:

    Dim myText As String = “-------------------------------------------------” & vbCrLf & “Line 2” & vbCrLf

    C1Editor1.ReplaceSelectedTextAsync(myText)

    It will only insert into the editor 1 long line that looks like:

    ------------------------------------------------- Line 2

  • Posted 18 August 2025, 8:18 am EST - Updated 19 August 2025, 2:11 am EST

    Hello,

    We’re able to observe the same behavior at our end. We have escalated it to the development team; the behavior does not seem to be right. [Internal Tracking ID: C1WIN-34412]

    Rest assured, we’ll get back once we have more information.

    Regards,

    Uttkarsh.

  • Posted 21 August 2025, 8:36 am EST

    Hello,

    The development team has created a task to investigate the behavior further.

    [Task tracking ID: C1WIN-34416]

    We’ll update you once we have any further information this.

    In the meantime, you can use the PasteTextAsync() method to paste two lines of text. In this method, you can use System.Environment.NewLine or “\n” just once.

    We apologise for any inconvenience.

    Regards,

    Uttkarsh.

Need extra support?

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

Learn More

Forum Channels