MCPcopy Index your code
hub / github.com/capricorncd/zx-editor

github.com/capricorncd/zx-editor @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
306 symbols 804 edges 51 files 39 documented · 13%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

SpEditor

Downloads Version License

移动端 HTML 文档(富文本)编辑器,支持图文混排、引用、大标题、无序列表,字体颜色、加粗、斜体。

SpEditor is a HTML5 rich text editor in smartphone browsers, and it's extends Editor.

Build Setup

# 安装依赖
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+

import { SpEditor } from 'sp-editor'
import 'sp-editor/css'
const spEditor = new SpEditor({
  // container: document.querySelector('#app'),
  // or
  container: '#app'
})

# browser

<link rel="stylesheet" href="https://github.com/capricorncd/zx-editor/raw/main/dist/sp-editor.min.css">







<script src="https://github.com/capricorncd/zx-editor/raw/main/dist/sp-editor.umd.js"></script>
<script>
  // 初始化ZX编辑器
  const spEditor = new SpEditor('#editorContainer', {
    placeholder: '请输入内容',
  })
  console.log(spEditor)
</script>

Preview

https://capricorncd.github.io/zx-editor/demo/

sp-editor Preview

Docs

Copyright and license

Code and documentation copyright 2018-Present. capricorncd. Code released under the MIT License.

Extension points exported contracts — how you extend this code

EditorPlugin (Interface)
(no doc) [3 implementers]
packages/editor/src/Editor.ts
VirtualNode (Interface)
(no doc)
packages/types/index.d.ts
ToolbarOptions (Interface)
(no doc)
packages/toolbar/src/options.ts
SpEditorOptions (Interface)
(no doc)
packages/sp-editor/src/options.ts
StylePanelOptions (Interface)
(no doc)
packages/style-panel/src/options.ts
EditorOptions (Interface)
(no doc)
packages/editor/src/options.ts
ButtonOptions (Interface)
(no doc)
packages/toolbar/src/options.ts

Core symbols most depended-on inside this repo

emit
called by 50
demo/assets/index-4c038887.js
d
called by 27
demo/assets/index-4c038887.js
f
called by 19
demo/assets/index-4c038887.js
on
called by 16
demo/assets/index-4c038887.js
insert
called by 14
packages/editor/src/Editor.ts
n
called by 14
demo/assets/index-4c038887.js
isPairedTags
called by 11
packages/editor/src/helpers.ts
hasSpecialTag
called by 10
packages/editor/src/helpers.ts

Shape

Function 192
Method 85
Class 22
Interface 7

Languages

TypeScript100%

Modules by API surface

demo/assets/index-4c038887.js116 symbols
demo-v2/js/zx-editor.min.js29 symbols
demo-v2/libs/exif.js20 symbols
packages/editor/src/Editor.ts19 symbols
demo-v2/libs/exif.min.js17 symbols
demo-v2/js/index.js15 symbols
demo-v2/libs/zx-debug.min.js14 symbols
packages/event-emitter/src/index.ts10 symbols
packages/style-panel/src/index.ts9 symbols
packages/toolbar/src/index.ts8 symbols
packages/editor/src/helpers.ts8 symbols
packages/sp-editor/src/index.ts7 symbols

For agents

$ claude mcp add zx-editor \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page