Is there a way to create a NSTextField where the input of the user replaces the text under the cursor?
And in addition: is there a way to change the cursor to a block cursor?
Is there a way to create a NSTextField where the input of the user replaces the text under the cursor?
And in addition: is there a way to change the cursor to a block cursor?
For your first problem, get the selected range of the text view, then replace that text with the input. So something like
NSRange range = [textView selectedRange];
[textView.textStorage replaceCharactersInRange:range withString:input];
For your second problem, refer to this.