To add a way of reproducing it which will show what I mean, do the following (in a C# project which contains a Cute Editor control inside of an ASPX page):
1. Go to http://cutesoft.net/developer+guide/add_your_own_custom_button.htm
2. Take the C# code from the second example and paste it into the page_load of the code behind. This should now provide the button in the toolbar (after minor adjustments to rename the editor variable to the name used in the ASPX page).
3. Replace '<h2>Hello World</h2>' with 'test'.
4. compile and run. Toolbar button appears.
5. Type random text into the editor. Click on the middle of the typed text to place cursor in middle of text and press toolbar button. The word 'test' should now appear in the middle of the text.
Now, go to the codebehind, change the 'test' line in the ExecCommand call to '<!--test-->' and recompile. Type a line of text, click on the middle of the text and press the button. Change to code view. Inserted comment appears at start of typed text, not in the middle.
- Is this expected behavior?
- Is there a way to program around it in order to place the comment in whatever place the cursor is in instead of the beginning of the line?