@kungal/editor-vue 0.31.0 → 0.31.1
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/CHANGELOG.md +43 -0
- package/README.md +4 -4
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,48 @@
|
|
|
1
1
|
# @kungal/editor-vue
|
|
2
2
|
|
|
3
|
+
## 0.31.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b7fe837: Fix a long `placeholder` overflowing the editor, and ship the reference
|
|
8
|
+
stylesheet from the layer.
|
|
9
|
+
|
|
10
|
+
The placeholder is a decoration (`.kun-editor__placeholder` +
|
|
11
|
+
`data-placeholder`) rendered by the host's `::before` rule. That rule was
|
|
12
|
+
absolutely positioned with **no positioned ancestor**, so the browser laid it
|
|
13
|
+
out against the viewport: a long placeholder ran past the editor's right edge —
|
|
14
|
+
and could even paint over the toolbar — instead of wrapping inside it. The
|
|
15
|
+
empty block is now the containing block, and the text wraps (`width: 100%` +
|
|
16
|
+
`overflow-wrap: break-word`):
|
|
17
|
+
|
|
18
|
+
```css
|
|
19
|
+
.kun-editor__placeholder {
|
|
20
|
+
position: relative;
|
|
21
|
+
}
|
|
22
|
+
.kun-editor__placeholder::before {
|
|
23
|
+
content: attr(data-placeholder);
|
|
24
|
+
position: absolute;
|
|
25
|
+
top: 0;
|
|
26
|
+
left: 0;
|
|
27
|
+
width: 100%;
|
|
28
|
+
overflow-wrap: break-word;
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Because that CSS lived only in the docs app, every host had a _copy_ — an
|
|
33
|
+
upstream style fix could never reach them. The reference stylesheet now ships
|
|
34
|
+
with `@kungal/editor-nuxt`, so hosts can import it and get fixes with a version
|
|
35
|
+
bump (copying it still works):
|
|
36
|
+
|
|
37
|
+
```css
|
|
38
|
+
@import "@kungal/editor-nuxt/editor.css";
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
`@kungal/editor-vue` is unchanged and still headless (zero CSS).
|
|
42
|
+
|
|
43
|
+
- Updated dependencies [b7fe837]
|
|
44
|
+
- @kungal/editor-core@0.31.1
|
|
45
|
+
|
|
3
46
|
## 0.31.0
|
|
4
47
|
|
|
5
48
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -7,8 +7,8 @@ WYSIWYG preview + markdown-source), its toolbar and the Vue plugin views
|
|
|
7
7
|
|
|
8
8
|
**Headless — ships zero CSS.** The component only renders stable class hooks
|
|
9
9
|
(`.kun-editor__*`, `.kun-mention-dropdown*`) + `data-*` state; you own the look.
|
|
10
|
-
|
|
11
|
-
(themed with KunUI tokens), or write your own. It works in any Vue 3 app;
|
|
10
|
+
Import the reference stylesheet [`@kungal/editor-nuxt/editor.css`](../editor-nuxt/editor.css)
|
|
11
|
+
(themed with KunUI tokens), copy it, or write your own. It works in any Vue 3 app;
|
|
12
12
|
`@kungal/editor-nuxt` adds Nuxt auto-import sugar.
|
|
13
13
|
|
|
14
14
|
## Usage
|
|
@@ -16,8 +16,8 @@ Copy the reference stylesheet [`apps/docs/app/assets/css/kun-editor.css`](../../
|
|
|
16
16
|
```vue
|
|
17
17
|
<script setup lang="ts">
|
|
18
18
|
import { KunEditor, type KunEditorAdapters } from '@kungal/editor-vue'
|
|
19
|
-
// Headless: bring your own styles
|
|
20
|
-
import '
|
|
19
|
+
// Headless: bring your own styles, or use the KunUI-themed reference sheet.
|
|
20
|
+
import '@kungal/editor-nuxt/editor.css'
|
|
21
21
|
|
|
22
22
|
const markdown = ref('')
|
|
23
23
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kungal/editor-vue",
|
|
3
|
-
"version": "0.31.
|
|
3
|
+
"version": "0.31.1",
|
|
4
4
|
"description": "KunEditor Vue 3 layer — the headless <KunEditor> component (dual WYSIWYG / markdown-source), toolbar and plugin views. Ships zero CSS and no UI-kit dependency; consumes @kungal/editor-core, and pairs with @kungal/editor-nuxt for optional KunUI chrome.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@prosemirror-adapter/vue": "^0.4.6",
|
|
43
|
-
"@kungal/editor-core": "0.31.
|
|
43
|
+
"@kungal/editor-core": "0.31.1"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"@codemirror/lang-markdown": "^6.0.0",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"vite": "^8.0.16",
|
|
81
81
|
"vue": "^3.5.35",
|
|
82
82
|
"vue-tsc": "^3.3.3",
|
|
83
|
-
"@kungal/editor-core": "0.31.
|
|
83
|
+
"@kungal/editor-core": "0.31.1"
|
|
84
84
|
},
|
|
85
85
|
"scripts": {
|
|
86
86
|
"build": "vite build && vue-tsc -p tsconfig.build.json",
|