Inserting HTML at current Caret position
Inserting HTML at the caret is a common need: the user picks a command in your application and a prepared snippet lands exactly where they were typing. The method for that is InsertHtml, on the editor's content service.
The command can sit anywhere in your own UI - an ordinary button on your form, a menu item, or a custom button you add to the editor's built-in toolbar. Toolbar buttons are added in code rather than through the Visual Studio designer: Toolbar1 and its buttons are exposed as read-only accessors and are deliberately not serialized into InitializeComponent, so that the control owns its own toolbar layout. Add a custom button to the built-in toolbar shows that in full.
The examples below assume the editor instance is named winFormHtmlEditor1 and the button is named btnInsert.

Wire that button's Click event to a handler - btnInsert_Click here - the same way you would wire any other button in your application. Your handler runs on the click, so anything it does to the editor happens against the live document:

Now, within that click event handler, you can write code like this:
private void btnInsert_Click(object sender, EventArgs e)
{
winFormHtmlEditor1.Content.InsertHtml("<span style='color:red;'>Sep 30</span> <span style='color:blue;'>renewal</span>", keepSelected: true);
}Private Sub btnInsert_Click(sender As Object, e As EventArgs)
winFormHtmlEditor1.Content.InsertHtml("<span style='color:red;'>Sep 30</span> <span style='color:blue;'>renewal</span>", keepSelected:=True)
End SubNow, you can run the application. Say your document contains a client notice, and your caret is positioned immediately before the word 'deadline'.

Clicking the button runs that handler, and the snippet lands at the caret:

You see that the inserted snippet is highlighted. That is because we passed the second argument of the method "keepSelected = true". If you pass that argument as false, then the inserted snippet will not be highlighted upon insertion. Anyway, once you deselect that part, you will see the snippet as follows:

Ask your AI to do this
Let your assistant do this for you. With the SpiceLogic MCP server connected, paste this into Claude Code, Cursor, or VS Code Copilot in agent mode.
Using the SpiceLogic WinForms HTML Editor already referenced in my project, add a toolbar button labeled "Insert signature" whose click handler calls Content.InsertHtml to drop a small colored HTML snippet at the current caret position, and show me the practical difference between passing keepSelected as true versus false so I can pick the right behavior for my composer. Confirm the real InsertHtml signature through the SpiceLogic MCP tools before writing the click handler.