Jump to content

Basic Textarea Editor


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
Edited by ColdEdge
Link to post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...