How to make javascript text-editor

|

We can make online text-editor using notepad,wordpad, and other text editor with javascript and css.
In this tutorial, we try to make text-editor that have features :

  • Font style
  • Font size
  • Font color
  • Bold, italic, underline
  • Link(to make a link to other site)
The objective is to undertsand more about coding in javascript.
This is the text-editor that we will make.



For the first step we must make the css.
We must declare the css for the body style, css for the color, font, size, link tag, etc..

Second step is make the interface

And,, the last step is make a javascript code

The core functions are we must make function to get the position cursor now, and set the cursor at the middle of the tag; function to put the tag beside the text selected; and how to insert it.

You can download this javascript text-editor and source code for free..

0 komentar: