@cgboiler/biz-basic 1.0.18 → 1.0.19

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.17";
8
+ export const version: "1.0.18";
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.17";
2
+ const version = "1.0.18";
3
3
  function install(app) {
4
4
  const components = [
5
5
  RichTextEditor
@@ -5,6 +5,7 @@ import { Editor, EditorContent } from "@tiptap/vue-3";
5
5
  import { useExtensions } from "./useExtensions";
6
6
  import { richTextEditorProps } from "./types";
7
7
  import "./index.css";
8
+ import { nextTick } from "process";
8
9
  var stdin_default = defineComponent({
9
10
  name: "RichTextEditor",
10
11
  props: richTextEditorProps,
@@ -22,8 +23,17 @@ var stdin_default = defineComponent({
22
23
  const initEditor = () => {
23
24
  editor.value = new Editor({
24
25
  extensions,
25
- editable: props.editable,
26
26
  content: props.modelValue,
27
+ onMount: ({
28
+ editor: editor2
29
+ }) => {
30
+ if (props.editable === false) {
31
+ nextTick(() => {
32
+ var _a, _b, _c;
33
+ (_c = (_b = (_a = editor2 == null ? void 0 : editor2.options) == null ? void 0 : _a.element) == null ? void 0 : _b.querySelector(".tiptap")) == null ? void 0 : _c.setAttribute("contenteditable", "false");
34
+ });
35
+ }
36
+ },
27
37
  onUpdate: ({
28
38
  editor: editor2
29
39
  }) => {
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.17";
8
+ export const version: "1.0.18";
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.17";
39
+ const version = "1.0.18";
40
40
  function install(app) {
41
41
  const components = [
42
42
  import_rich_text_editor.default
@@ -27,6 +27,7 @@ var import_vue_3 = require("@tiptap/vue-3");
27
27
  var import_useExtensions = require("./useExtensions");
28
28
  var import_types = require("./types");
29
29
  var import_index = require("./index.css");
30
+ var import_process = require("process");
30
31
  var stdin_default = (0, import_vue2.defineComponent)({
31
32
  name: "RichTextEditor",
32
33
  props: import_types.richTextEditorProps,
@@ -44,8 +45,17 @@ var stdin_default = (0, import_vue2.defineComponent)({
44
45
  const initEditor = () => {
45
46
  editor.value = new import_vue_3.Editor({
46
47
  extensions,
47
- editable: props.editable,
48
48
  content: props.modelValue,
49
+ onMount: ({
50
+ editor: editor2
51
+ }) => {
52
+ if (props.editable === false) {
53
+ (0, import_process.nextTick)(() => {
54
+ var _a, _b, _c;
55
+ (_c = (_b = (_a = editor2 == null ? void 0 : editor2.options) == null ? void 0 : _a.element) == null ? void 0 : _b.querySelector(".tiptap")) == null ? void 0 : _c.setAttribute("contenteditable", "false");
56
+ });
57
+ }
58
+ },
49
59
  onUpdate: ({
50
60
  editor: editor2
51
61
  }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cgboiler/biz-basic",
3
- "version": "1.0.18",
3
+ "version": "1.0.19",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",