This is a web component based text editor.
This project needs yarn and globally installed webpack to build and also needs globally installed webpack-dev-server to test.
$ git clone https://github.com/frodo821/web-component-text-editor.git
$ cd web-component-text-editor
$ yarn run build
And then, text-editor-element.js
will be generated under dist/
folder.
In head section:
<script src="/path/to/text-editor-elements.js"></script>
Somewhere you want in body section:
<text-editor></text-editor>
- rows: number of rows of the text editor.
- columns: number of columns of the text editor.
- Bugs and Problems
- When deleting characters, sometimes the caret goes back one character more.
- Changing properties after initialized makes no effect.
- When full width characters are entered, the caret doesn't points actual potision.
- Scrolling editor makes caret overflowed from view.
- Not Implemented Functions
- Extensions to add or to vary editor behaviour.
- File operations (ex. open, save, etc.)