Hello,
I was wondering how it is possible to insert text between HTML tags in Cocoa. I am displaying source code in a NSTextView - example:
<html>
<head>
<title>test</title>
</head>
<body>hello!</body>
</html>
The code above can vary in size, but what should I do if I wanted to insert say <link rel="apple-touch-icon" href="webclip.png" />
at any place between the <head>
tags?
Edit: To clarify, I am not looking on how to insert text into an NSTextView, but on how to insert the text between the head tags that are already in the textview. I'm working on a HTML editor.
Thank you! :)