@kungal/editor-nuxt 0.34.0 → 0.35.0
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/package.json +3 -3
- package/runtime/KunEditorToolbar.vue +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,48 @@
|
|
|
1
1
|
# @kungal/editor-nuxt
|
|
2
2
|
|
|
3
|
+
## 0.35.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- c90e1b9: fix(link): give a typed URL the scheme it needs, in ONE place
|
|
8
|
+
|
|
9
|
+
Typing `www.kungal.com/topic/1` into any link input produced a **relative**
|
|
10
|
+
href: with no scheme the browser resolves it against the current page, so the
|
|
11
|
+
link went to `<origin>/<current/path>/www.kungal.com/topic/1` — dead, and dead
|
|
12
|
+
in a way the author can't see while writing.
|
|
13
|
+
|
|
14
|
+
`insertLinkCommand` now normalizes its `href`, and since every link entry point
|
|
15
|
+
(the selection bubble's input, the headless toolbar's URL panel, the KunUI
|
|
16
|
+
toolbar's popover, and a host's own `linkPrompt` adapter) dispatches that one
|
|
17
|
+
command, all of them are fixed at once — a host must not re-implement this.
|
|
18
|
+
|
|
19
|
+
- `www.kungal.com/topic/1` → `https://www.kungal.com/topic/1` (https, not http:
|
|
20
|
+
an http-only site redirects, an https-only site doesn't). Ports, queries,
|
|
21
|
+
fragments and bare IPv4 hosts included.
|
|
22
|
+
- `me@kungal.com` → `mailto:me@kungal.com` (`https://` would read the address as
|
|
23
|
+
userinfo and go nowhere).
|
|
24
|
+
- Untouched: anything with a scheme — `kungal-user:` / `kungal-reply:` included
|
|
25
|
+
— and anything explicitly relative (`/x`, `./x`, `../x`, `#x`, `?x`, `//host`).
|
|
26
|
+
- The one ambiguous input is a lone dotted word: `readme.md` looks exactly like
|
|
27
|
+
a hostname (`.md` is a TLD), so it gets `https://`. Write `./readme.md` when a
|
|
28
|
+
relative file is what you mean.
|
|
29
|
+
|
|
30
|
+
The rule is also exported as `normalizeLinkHref(input)` from the light,
|
|
31
|
+
zero-dependency `@kungal/editor-core` entry, so a server can normalize legacy
|
|
32
|
+
content with the exact same logic.
|
|
33
|
+
|
|
34
|
+
Along with it, the three URL inputs move from `type="url"` to `type="text"` +
|
|
35
|
+
`inputmode="url"`. Native URL validation rejects exactly the schemeless input
|
|
36
|
+
this change exists to accept — in the KunUI toolbar's popover, which submits a
|
|
37
|
+
real `<form>`, pressing Enter on `www.kungal.com/topic/1` did nothing at all.
|
|
38
|
+
The mobile keyboard hint is kept.
|
|
39
|
+
|
|
40
|
+
### Patch Changes
|
|
41
|
+
|
|
42
|
+
- Updated dependencies [c90e1b9]
|
|
43
|
+
- @kungal/editor-core@0.35.0
|
|
44
|
+
- @kungal/editor-vue@0.35.0
|
|
45
|
+
|
|
3
46
|
## 0.34.0
|
|
4
47
|
|
|
5
48
|
### Minor Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kungal/editor-nuxt",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.35.0",
|
|
4
4
|
"description": "KunEditor Nuxt Layer — wraps @kungal/editor-vue and auto-imports <KunEditor> so an existing Nuxt app keeps its exact DX (no import needed).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"nuxt.config.ts"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@kungal/editor-core": "0.
|
|
36
|
-
"@kungal/editor-vue": "0.
|
|
35
|
+
"@kungal/editor-core": "0.35.0",
|
|
36
|
+
"@kungal/editor-vue": "0.35.0"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@kungal/ui-vue": "^2.7.0",
|
|
@@ -319,10 +319,14 @@ const insertSticker = (src: string, name: string) =>
|
|
|
319
319
|
</KunButton>
|
|
320
320
|
</KunTooltip>
|
|
321
321
|
</template>
|
|
322
|
+
<!-- `type="text"` + `inputmode="url"`, never `type="url"`: this IS a
|
|
323
|
+
form, so native URL validation would block submit on a schemeless
|
|
324
|
+
`www.a.com/x` — the very input insertLinkCommand normalizes. -->
|
|
322
325
|
<form class="flex items-center gap-1" @submit.prevent="applyLink">
|
|
323
326
|
<KunInput
|
|
324
327
|
v-model="linkUrl"
|
|
325
|
-
type="
|
|
328
|
+
type="text"
|
|
329
|
+
inputmode="url"
|
|
326
330
|
size="sm"
|
|
327
331
|
:placeholder="t.linkPlaceholder"
|
|
328
332
|
:autofocus="true"
|