@sanmokeji/smo-editor 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -1,48 +1,37 @@
|
|
|
1
|
-
# smo-editor
|
|
1
|
+
# @sanmokeji/smo-editor
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
🚀 **SmoEditor** 是一款基于 Vue 3 和 Tiptap 打造的轻量、高效、开箱即用的富文本编辑器组件。具备完美的 TypeScript 类型支持。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
---
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## ✨ 特性
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
- ⚡ **轻量高效**:基于 Tiptap 核心精心封装,无冗余依赖。
|
|
10
|
+
- 📦 **开箱即用**:内置常用富文本工具栏,集成图片上传、气泡菜单等高级功能。
|
|
11
|
+
- 💙 **TypeScript 强类型**:提供完整的、模块化的类型定义,享受完美的 IDE 提示。
|
|
12
|
+
- 🎨 **样式优雅**:原生支持现代样式体系,适配极佳。
|
|
10
13
|
|
|
11
|
-
|
|
12
|
-
- [Vue.js devtools](https://chromewebstore.google.com/detail/vuejs-devtools/nhdogjmejiglipccpnnnanhbledajbpd)
|
|
13
|
-
- [Turn on Custom Object Formatter in Chrome DevTools](http://bit.ly/object-formatters)
|
|
14
|
-
- Firefox:
|
|
15
|
-
- [Vue.js devtools](https://addons.mozilla.org/en-US/firefox/addon/vue-js-devtools/)
|
|
16
|
-
- [Turn on Custom Object Formatter in Firefox DevTools](https://fxdx.dev/firefox-devtools-custom-object-formatters/)
|
|
14
|
+
---
|
|
17
15
|
|
|
18
|
-
##
|
|
16
|
+
## 📦 安装
|
|
19
17
|
|
|
20
|
-
|
|
18
|
+
使用你喜欢的包管理器进行安装:
|
|
21
19
|
|
|
22
|
-
|
|
20
|
+
```bash
|
|
21
|
+
# 使用 pnpm (推荐)
|
|
22
|
+
pnpm add @sanmokeji/smo-editor
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
# 使用 npm
|
|
25
|
+
npm i @sanmokeji/smo-editor
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
```sh
|
|
29
|
-
pnpm install
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
### Compile and Hot-Reload for Development
|
|
33
|
-
|
|
34
|
-
```sh
|
|
35
|
-
pnpm dev
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
### Type-Check, Compile and Minify for Production
|
|
39
|
-
|
|
40
|
-
```sh
|
|
41
|
-
pnpm build
|
|
27
|
+
# 使用 yarn
|
|
28
|
+
yarn add @sanmokeji/smo-editor
|
|
42
29
|
```
|
|
43
30
|
|
|
44
|
-
|
|
31
|
+
## 开始使用
|
|
45
32
|
|
|
46
|
-
```
|
|
47
|
-
|
|
33
|
+
```ts
|
|
34
|
+
import { SmoEditor, type SmoEditorOptions } from '@sanmokeji/smo-editor'
|
|
35
|
+
// 2. 引入组件配套样式
|
|
36
|
+
import '@sanmokeji/smo-editor/dist/index.css'
|
|
48
37
|
```
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanmokeji/smo-editor",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"main": "./dist/
|
|
5
|
-
"module": "./dist/
|
|
3
|
+
"version": "0.0.4",
|
|
4
|
+
"main": "./dist/index.js",
|
|
5
|
+
"module": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
10
|
"types": "./dist/index.d.ts",
|
|
11
|
-
"import": "./dist/
|
|
12
|
-
"default": "./dist/
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"default": "./dist/index.js"
|
|
13
13
|
},
|
|
14
|
-
"./dist/
|
|
14
|
+
"./dist/index.css": "./dist/index.css"
|
|
15
15
|
},
|
|
16
16
|
"description": "基于 Tiptap + Vue 3 的富文本编辑器组件。",
|
|
17
17
|
"keywords": [
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"vue": "^3.0.0"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
+
"@sanmokeji/smo-editor": "^0.0.3",
|
|
38
39
|
"@tiptap/extension-file-handler": "^3.23.6",
|
|
39
40
|
"@tiptap/extension-image": "^3.23.6",
|
|
40
41
|
"@tiptap/extension-placeholder": "^3.23.6",
|
|
File without changes
|
|
File without changes
|