una-editor 0.4.0-alpha.4 → 0.4.0-alpha.5
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.en.md +15 -0
- package/README.md +15 -0
- package/dist/{index-CJaHSXXm.js → index-BBXzv24U.js} +529 -516
- package/dist/{index-D-lTdNim.js → index-BYijP3sT.js} +1 -1
- package/dist/{index-CUWKj-Pm.cjs → index-BwM6HJJo.cjs} +1 -1
- package/dist/{index-xk13mx42.cjs → index-Clo3tUCL.cjs} +26 -26
- package/dist/{index-DQaIv52u.cjs → index-DXVxeIh9.cjs} +1 -1
- package/dist/{index-BGsEz2lq.js → index-DgzdgV8D.js} +1 -1
- package/dist/{index-B6kc5e_c.cjs → index-NB-qozKu.cjs} +1 -1
- package/dist/{index-B4J47r4S.js → index-ubaM-DTb.js} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/types/components/UnaEditor.vue.d.ts +1 -0
- package/dist/types/components/UnaEditor.vue.d.ts.map +1 -1
- package/dist/types/composables/useEditor.d.ts.map +1 -1
- package/dist/types/extensions/codeBlockLivePreview.d.ts.map +1 -1
- package/dist/types/extensions/structuredTable.d.ts.map +1 -1
- package/dist/types/types/editor.d.ts +1 -0
- package/dist/types/types/editor.d.ts.map +1 -1
- package/dist/una-editor.css +1 -1
- package/package.json +1 -1
package/README.en.md
CHANGED
|
@@ -24,6 +24,7 @@ A lightweight, high-performance Vue 3 editor component library based on CodeMirr
|
|
|
24
24
|
- 🧩 **Structured Table Editing**: Supports structured table rendering, cell editing, row/column handles, append, and delete interactions under `livePreview`.
|
|
25
25
|
- ⌨️ **Vim Mode Support**: Built-in classic Vim modal editing and keybindings.
|
|
26
26
|
- 🎨 **Code Block Syntax Highlighting**: Built-in multi-language syntax highlighting with 9 color schemes and optional line numbers.
|
|
27
|
+
- 📐 **Default 720px Content Column**: Wide layouts keep prose readable by constraining body content, images, tables, and code blocks to a shared column width.
|
|
27
28
|
- 📦 **Dual Output Formats**: Supports both ESM and CommonJS.
|
|
28
29
|
|
|
29
30
|
## 📦 Installation
|
|
@@ -57,6 +58,20 @@ const content = ref('# Hello Una Editor!');
|
|
|
57
58
|
</template>
|
|
58
59
|
```
|
|
59
60
|
|
|
61
|
+
## ✍️ Content Column
|
|
62
|
+
|
|
63
|
+
Una Editor constrains the prose content column to a maximum width of `720px` by default, while the left line-number gutter stays pinned to the outer editor edge. Images, structured tables, and code blocks follow the same shared width rule.
|
|
64
|
+
|
|
65
|
+
Use `contentMaxWidth` when you want a different writing column:
|
|
66
|
+
|
|
67
|
+
```vue
|
|
68
|
+
<UnaEditor
|
|
69
|
+
v-model="content"
|
|
70
|
+
:content-max-width="840"
|
|
71
|
+
:live-preview="true"
|
|
72
|
+
/>
|
|
73
|
+
```
|
|
74
|
+
|
|
60
75
|
## 🎨 Code Block Syntax Highlighting
|
|
61
76
|
|
|
62
77
|
Una Editor has built-in code block syntax highlighting with 9 color schemes and optional line numbers.
|
package/README.md
CHANGED
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
- 🧩 **结构化表格编辑**:在 `livePreview` 下支持结构化表格渲染、单元格编辑、行列 handle、追加与删除等交互。
|
|
25
25
|
- ⌨️ **Vim 模式支持**:内置经典的 Vim 模态编辑与键位绑定。
|
|
26
26
|
- 🎨 **代码块语法高亮**:内置多语言语法高亮,支持 9 套配色方案和可选行号。
|
|
27
|
+
- 📐 **默认 720px 内容版心**:宽屏下自动限制正文内容列宽度,图片、表格和代码块跟随统一版心。
|
|
27
28
|
- 📦 **双格式输出**:同时支持 ESM 和 CommonJS。
|
|
28
29
|
|
|
29
30
|
## 📦 安装
|
|
@@ -57,6 +58,20 @@ const content = ref('# Hello Una Editor!');
|
|
|
57
58
|
</template>
|
|
58
59
|
```
|
|
59
60
|
|
|
61
|
+
## ✍️ 内容版心
|
|
62
|
+
|
|
63
|
+
Una Editor 默认会将正文内容列限制在 `720px` 的最大宽度内,而左侧行号 gutter 仍然贴靠编辑器外框左侧显示。图片、结构化表格和代码块会跟随同一条内容版心约束。
|
|
64
|
+
|
|
65
|
+
如果你想覆盖默认版心宽度,可以使用 `contentMaxWidth`:
|
|
66
|
+
|
|
67
|
+
```vue
|
|
68
|
+
<UnaEditor
|
|
69
|
+
v-model="content"
|
|
70
|
+
:content-max-width="840"
|
|
71
|
+
:live-preview="true"
|
|
72
|
+
/>
|
|
73
|
+
```
|
|
74
|
+
|
|
60
75
|
## 🎨 代码块语法高亮
|
|
61
76
|
|
|
62
77
|
Una Editor 内置了代码块语法高亮功能,支持 9 套配色方案和可选的代码行号。
|