This page editor was completed yesterday afternoon. The folder was compressed last night. This morning, everything in the folder was lost. The compressed file is empty. I felt dizzy in my head, and I lost my work yesterday. So I made up my mind to create a version library for myselfCodeUpload to the server. To avoid repeated tragedies.
In fact, there is nothing to say about the development editor. I wrote this blog mainly to record the development process and difficulties encountered during the development process.
In addition to textarea, you must useContenteditable = "true ". If you are editing under IFRAME, you need to useDesignMode = "on ". I am using IFRAME.
The main tool used by the page editor is document.exe ccommand (). There are many ways to use it online.
That's all. For specific examples, see the code. I wrote a lot of comments.
Address: https://github.com/zhenchaozhu/Editor.