I need such function:
User can select the text and to set those text can not be deleted (delete protected).
I search richview help doc, I know how to protect the item by itemNo, but could not found how to do with user selected text. I thought need to split the select text from origin item(for example, first character of selected text is not begin at item), and apply those new item protect style.
how to split those item? I thought insert checkpoint can do,but I know that is not best solution.
another question. if user do that many times , the doc will have more fragment item. how to avoid more fragmented document?
how to implement that user can protect they selected text?
-
- Posts: 38
- Joined: Sat Nov 06, 2010 5:12 am
-
- Posts: 38
- Joined: Sat Nov 06, 2010 5:12 am
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Posts: 38
- Joined: Sat Nov 06, 2010 5:12 am
thank. That's great!Sergey Tkachenko wrote:To change attributes of the selected text, use ApplyStyleConversion method. You need to implement OnStyleConversion event where you can return the index of the style with midified Protection property.
The example of implementation of this event can be found in Demos\*\Editors\Editor 2\