@cgboiler/biz-basic 1.0.49 → 1.0.50
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/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/rich-text-editor/useExtensions.js +11 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/rich-text-editor/useExtensions.js +11 -1
- package/package.json +1 -1
package/es/index.d.ts
CHANGED
package/es/index.js
CHANGED
|
@@ -56,6 +56,9 @@ function useExtensions({ props, emit }) {
|
|
|
56
56
|
};
|
|
57
57
|
const HashTag = Mention.extend({
|
|
58
58
|
name: "hashTag",
|
|
59
|
+
parseHTML() {
|
|
60
|
+
return [{ tag: 'span[data-type="hashTag"]' }];
|
|
61
|
+
},
|
|
59
62
|
renderHTML({ node }) {
|
|
60
63
|
var _a, _b, _c, _d;
|
|
61
64
|
const id = (_b = (_a = node == null ? void 0 : node.attrs) == null ? void 0 : _a.id) != null ? _b : "";
|
|
@@ -146,6 +149,9 @@ function useExtensions({ props, emit }) {
|
|
|
146
149
|
});
|
|
147
150
|
const CustomContent = Mention.extend({
|
|
148
151
|
name: "customContent",
|
|
152
|
+
parseHTML() {
|
|
153
|
+
return [{ tag: 'span[data-type="custom-content"]' }];
|
|
154
|
+
},
|
|
149
155
|
addAttributes() {
|
|
150
156
|
return {
|
|
151
157
|
id: {
|
|
@@ -176,7 +182,11 @@ function useExtensions({ props, emit }) {
|
|
|
176
182
|
default: null,
|
|
177
183
|
parseHTML: (element) => {
|
|
178
184
|
const objStr = element.getAttribute("obj");
|
|
179
|
-
|
|
185
|
+
try {
|
|
186
|
+
return objStr ? JSON.parse(objStr) : null;
|
|
187
|
+
} catch (e) {
|
|
188
|
+
return null;
|
|
189
|
+
}
|
|
180
190
|
},
|
|
181
191
|
renderHTML: (attributes) => {
|
|
182
192
|
if (!attributes.obj) {
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -36,7 +36,7 @@ __export(stdin_exports, {
|
|
|
36
36
|
module.exports = __toCommonJS(stdin_exports);
|
|
37
37
|
var import_rich_text_editor = __toESM(require("./rich-text-editor"));
|
|
38
38
|
__reExport(stdin_exports, require("./rich-text-editor"), module.exports);
|
|
39
|
-
const version = "1.0.
|
|
39
|
+
const version = "1.0.49";
|
|
40
40
|
function install(app) {
|
|
41
41
|
const components = [
|
|
42
42
|
import_rich_text_editor.default
|
|
@@ -88,6 +88,9 @@ function useExtensions({ props, emit }) {
|
|
|
88
88
|
};
|
|
89
89
|
const HashTag = import_extension_mention.default.extend({
|
|
90
90
|
name: "hashTag",
|
|
91
|
+
parseHTML() {
|
|
92
|
+
return [{ tag: 'span[data-type="hashTag"]' }];
|
|
93
|
+
},
|
|
91
94
|
renderHTML({ node }) {
|
|
92
95
|
var _a, _b, _c, _d;
|
|
93
96
|
const id = (_b = (_a = node == null ? void 0 : node.attrs) == null ? void 0 : _a.id) != null ? _b : "";
|
|
@@ -178,6 +181,9 @@ function useExtensions({ props, emit }) {
|
|
|
178
181
|
});
|
|
179
182
|
const CustomContent = import_extension_mention.default.extend({
|
|
180
183
|
name: "customContent",
|
|
184
|
+
parseHTML() {
|
|
185
|
+
return [{ tag: 'span[data-type="custom-content"]' }];
|
|
186
|
+
},
|
|
181
187
|
addAttributes() {
|
|
182
188
|
return {
|
|
183
189
|
id: {
|
|
@@ -208,7 +214,11 @@ function useExtensions({ props, emit }) {
|
|
|
208
214
|
default: null,
|
|
209
215
|
parseHTML: (element) => {
|
|
210
216
|
const objStr = element.getAttribute("obj");
|
|
211
|
-
|
|
217
|
+
try {
|
|
218
|
+
return objStr ? JSON.parse(objStr) : null;
|
|
219
|
+
} catch (e) {
|
|
220
|
+
return null;
|
|
221
|
+
}
|
|
212
222
|
},
|
|
213
223
|
renderHTML: (attributes) => {
|
|
214
224
|
if (!attributes.obj) {
|