What I ment was I wanted to code my own, or use something like a class to make one. Not just download someone elses WYSIWYG editor.
Anyways I have found something called execCommand.
But there is a problem with the link and image insertion. It works fine but when I save the data to a file and then reopen it in the editor it adds the web URL again.
Example.
Web URL in Editor:
http://www.domain.com
Save it to the file:
http://www.domain.com
Re-open the file in the editor: http://www.domain.com/"http://www.domain.com
Re-save it to file: http://www.domain.com/"http://www.domain.com
Do you get what I mean, it works fine the first time but when it gets re-opened it adds the URL to the front of the link again.
It also does the same with an image.
Web URL in Editor: /path/image.jpg
Save it to the file: /path/image.jpg
Re-open the file in the editor: http://www.domain.com/"/path/image.jpg
Re-save it to file: http://www.domain.com/"/path/image.jpg
Its really annoying, any ideas how to fix it?
Like could I use str.replace or something?