textEditorData.CanEdit = false;
if (textEditorData.CanEdit) { // Make changes to text content here. } else { // Prompt user that editing is currently disabled. }This example checks if CanEdit property of textEditorData object is true before permitting any text changes. If the property is false, it displays a user-friendly message to indicate that editing is disabled. Package Library: Mono.TextEditor