Jump to content

Basic Textarea Editor


ColdEdge

Recommended Posts

Hey. Ok I am need a bit of help. I am currently using TinyMCE. However I want to make my own basic editor. It doesn't have to update the contence inside of it; ex if you insert the picture the picture is show. I dont need this.What I need is say you click Image icon it uses javascript input to open a alert window, asking for the image url and after you click OK, it adds the image into the texteare as such

[*img]....[*/img][*video]......[*/video][color=#313131]....[*/color][*b]..[*/b][*i]..[*/i][*url=http://....]title[*/url]...[code]This is about itP.S. No * for some reason the thing are not displayed properly
Link to comment
Share on other sites

Does the term DOM mean anything to you? If it does, keep reading, and if not, see W3Schools' tutorials on the subject...You can append stuff to the textarea's innerHTML as far as adding contents is concerned. If you want to add stuff around selection, that's a little trickier. See this and this for a taste of the pain.If you want to actually visualize the result in a TinyMCE like fashion (but visulize it along with the textarea, not instead of it), you can add an iframe, and refresh its contents on the onkeyup event, again by taking the current innerHTML of the textarea.(Seriously, this stuff is far from "basic", even on the "basic" level)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...