@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 CHANGED
@@ -5,6 +5,6 @@ declare namespace _default {
5
5
  }
6
6
  export default _default;
7
7
  export function install(app: any): void;
8
- export const version: "1.0.48";
8
+ export const version: "1.0.49";
9
9
  import RichTextEditor from './rich-text-editor';
10
10
  export { RichTextEditor };
package/es/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import RichTextEditor from "./rich-text-editor";
2
- const version = "1.0.48";
2
+ const version = "1.0.49";
3
3
  function install(app) {
4
4
  const components = [
5
5
  RichTextEditor
@@ -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
- return objStr ? JSON.parse(objStr) : null;
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
@@ -5,6 +5,6 @@ declare namespace _default {
5
5
  }
6
6
  export default _default;
7
7
  export function install(app: any): void;
8
- export const version: "1.0.48";
8
+ export const version: "1.0.49";
9
9
  import RichTextEditor from './rich-text-editor';
10
10
  export { RichTextEditor };
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.48";
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
- return objStr ? JSON.parse(objStr) : null;
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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cgboiler/biz-basic",
3
- "version": "1.0.49",
3
+ "version": "1.0.50",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",