Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/capricorncd/zx-editor
The HTML document (rich text) editor in Smart phone browser or webview, supporting mixed layout, reference, headline, unordered list, font color, bold and italics. 移动端HTML文档(富文本)编辑器,支持图文混排、引用、大标题、无序列表,字体颜色、加粗、斜体
https://github.com/capricorncd/zx-editor
editor html5 npm-workspaces smart-phone typescript
Last synced: 3 months ago
JSON representation
The HTML document (rich text) editor in Smart phone browser or webview, supporting mixed layout, reference, headline, unordered list, font color, bold and italics. 移动端HTML文档(富文本)编辑器,支持图文混排、引用、大标题、无序列表,字体颜色、加粗、斜体
- Host: GitHub
- URL: https://github.com/capricorncd/zx-editor
- Owner: capricorncd
- Created: 2018-01-30T15:14:40.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2024-04-04T12:41:59.000Z (7 months ago)
- Last Synced: 2024-04-14T11:41:18.654Z (7 months ago)
- Topics: editor, html5, npm-workspaces, smart-phone, typescript
- Language: TypeScript
- Homepage: https://capricorncd.github.io/zx-editor/demo
- Size: 4.01 MB
- Stars: 330
- Watchers: 12
- Forks: 100
- Open Issues: 27
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-github-star - zx-editor
README
# SpEditor
移动端 HTML 文档(富文本)编辑器,支持图文混排、引用、大标题、无序列表,字体颜色、加粗、斜体。
[SpEditor](./docs/SpEditor.md) is a HTML5 rich text editor in smartphone browsers, and it's extends [Editor](./docs/Editor.md).
## Build Setup
```bash
# 安装依赖
npm i# http://localhost:9001
npm run dev# build files
npm run build
```## 使用 Use
```
# npm
npm i sp-editor# pnpm
pnpm i sp-editor# yarn
yarn add sp-editor
```#### # ES6+
```javascript
import { SpEditor } from 'sp-editor'
import 'sp-editor/css'
const spEditor = new SpEditor({
// container: document.querySelector('#app'),
// or
container: '#app'
})
```#### # browser
```html
// 初始化ZX编辑器
const spEditor = new SpEditor('#editorContainer', {
placeholder: '请输入内容',
})
console.log(spEditor)```
## Preview
https://capricorncd.github.io/zx-editor/demo/
![sp-editor Preview](./qr.png)
## Docs
- [SpEditor](./docs/SpEditor.md)
- [Editor](./docs/Editor.md)
- [EventEmitter](./docs/EventEmitter.md)
- [Other](./docs)
## Copyright and license
Code and documentation copyright 2018-Present. capricorncd. Code released under the MIT License.