I try to make a rich text editor using a content editable UIWebView, as UITextView doesn’t get any enrichment. I wonder how I can replace a selection programmatically or insert HTML code (for example to create a link to the selected text, or to implement a search/replace function). I tried:
[self.webTexteView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"document.ExecCommand('insertHTML', false, '%@')", myString]];
but it doesn’t work… Do you know if there is a solution to that?
Thanks,
Denis
This is late, but just incase anyone else is looking at this your original solution works, you just accidentally have
it should be
Ive tested it with the lower case e and it works.