@opentiny/vue-renderless 3.18.2 → 3.18.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/anchor/index.js +5 -2
- package/common/index.js +1 -1
- package/common/runtime.js +1 -1
- package/common/xss.js +2 -2
- package/fluent-editor/options.js +39 -5
- package/package.json +1 -1
package/anchor/index.js
CHANGED
|
@@ -90,8 +90,11 @@ const handleScroll = (state) => () => {
|
|
|
90
90
|
}, 200);
|
|
91
91
|
};
|
|
92
92
|
const setChildOffsetTop = ({ state, props }) => {
|
|
93
|
-
var _a;
|
|
94
|
-
|
|
93
|
+
var _a, _b;
|
|
94
|
+
if (!((_a = props.links) == null ? void 0 : _a.length)) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
state.offsetTop = ((_b = document.querySelector(props.links[0].link)) == null ? void 0 : _b.offsetTop) || 0;
|
|
95
98
|
};
|
|
96
99
|
const getContainer = ({ props }) => () => props.containerId && document.querySelector(props.containerId) || document.body;
|
|
97
100
|
const mounted = ({ state, api, props, nextTick }) => () => {
|
package/common/index.js
CHANGED
package/common/runtime.js
CHANGED
package/common/xss.js
CHANGED
|
@@ -9,7 +9,7 @@ let xssOptions = {
|
|
|
9
9
|
enableUrl: true,
|
|
10
10
|
html: {
|
|
11
11
|
whiteList: {
|
|
12
|
-
a: ["class", "style", "contenteditable", "data-id", "data-title", "data-size", "data-last-modified"],
|
|
12
|
+
a: ["class", "style", "contenteditable", "data-id", "data-title", "data-size", "data-last-modified", "href"],
|
|
13
13
|
address: ["class", "style"],
|
|
14
14
|
area: ["class", "style"],
|
|
15
15
|
article: ["class", "style"],
|
|
@@ -61,7 +61,7 @@ let xssOptions = {
|
|
|
61
61
|
header: ["class", "style"],
|
|
62
62
|
hr: ["class", "style"],
|
|
63
63
|
i: ["class", "style", "data-image-id", "data-image"],
|
|
64
|
-
img: ["class", "style", "devui-editorx-image", "style", "data-image-id"],
|
|
64
|
+
img: ["class", "style", "devui-editorx-image", "style", "data-image-id", "src"],
|
|
65
65
|
input: ["class", "style", "data-formula", "data-link", "data-video"],
|
|
66
66
|
ins: ["class", "style"],
|
|
67
67
|
li: ["class", "style"],
|
package/fluent-editor/options.js
CHANGED
|
@@ -3,6 +3,40 @@ import {
|
|
|
3
3
|
__spreadValues
|
|
4
4
|
} from "../chunk-G2ADBYYC.js";
|
|
5
5
|
import { isNull } from "../common/type";
|
|
6
|
+
const fontFamilyConfig = [
|
|
7
|
+
"songti",
|
|
8
|
+
"yahei",
|
|
9
|
+
"kaiti",
|
|
10
|
+
"heiti",
|
|
11
|
+
"lishu",
|
|
12
|
+
"mono",
|
|
13
|
+
"arial",
|
|
14
|
+
"arialblack",
|
|
15
|
+
"comic",
|
|
16
|
+
"impact",
|
|
17
|
+
"times"
|
|
18
|
+
];
|
|
19
|
+
const fontSizeConfig = [
|
|
20
|
+
"12px",
|
|
21
|
+
"13px",
|
|
22
|
+
"14px",
|
|
23
|
+
"15px",
|
|
24
|
+
"16px",
|
|
25
|
+
"17px",
|
|
26
|
+
"18px",
|
|
27
|
+
"19px",
|
|
28
|
+
"20px",
|
|
29
|
+
"22px",
|
|
30
|
+
"24px",
|
|
31
|
+
"26px",
|
|
32
|
+
"29px",
|
|
33
|
+
"32px",
|
|
34
|
+
"36px",
|
|
35
|
+
"40px",
|
|
36
|
+
"48px",
|
|
37
|
+
"72px"
|
|
38
|
+
];
|
|
39
|
+
const lineHeightConfig = ["1", "1.2", "1.5", "2", "2.5", "3", "4", "5"];
|
|
6
40
|
const betterTable = {
|
|
7
41
|
operationMenu: {
|
|
8
42
|
items: {
|
|
@@ -22,7 +56,7 @@ const betterTable = {
|
|
|
22
56
|
color: true
|
|
23
57
|
}
|
|
24
58
|
};
|
|
25
|
-
const toolbar = (
|
|
59
|
+
const toolbar = () => {
|
|
26
60
|
const underline = ["bold", "italic", "underline", "strike"];
|
|
27
61
|
const list = [{ list: "ordered" }, { list: "bullet" }];
|
|
28
62
|
const script = [{ script: "sub" }, { script: "super" }];
|
|
@@ -30,9 +64,9 @@ const toolbar = (FluentEditor) => {
|
|
|
30
64
|
container: [
|
|
31
65
|
["undo", "redo", "clean"],
|
|
32
66
|
[
|
|
33
|
-
{ font:
|
|
34
|
-
{ size:
|
|
35
|
-
{ lineheight:
|
|
67
|
+
{ font: fontFamilyConfig },
|
|
68
|
+
{ size: fontSizeConfig },
|
|
69
|
+
{ lineheight: lineHeightConfig },
|
|
36
70
|
{ header: [1, 2, 3, 4, 5, 6, false] }
|
|
37
71
|
],
|
|
38
72
|
underline,
|
|
@@ -155,7 +189,7 @@ const defaultOption = ({ FluentEditor, state, mentionObj }) => {
|
|
|
155
189
|
// 上传文件需开启
|
|
156
190
|
image: FluentEditor.imports["modules/image-spec"],
|
|
157
191
|
counter: false,
|
|
158
|
-
toolbar: toolbar(
|
|
192
|
+
toolbar: toolbar(),
|
|
159
193
|
"better-table": betterTable,
|
|
160
194
|
mention: mention(mentionObj),
|
|
161
195
|
keyboard: keyboard({ FluentEditor, state })
|
package/package.json
CHANGED