vue-editify 0.0.37 → 0.0.38

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/examples/App.vue CHANGED
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div style="padding: 100px 50px 50px 50px">
3
- <editify v-model="value" placeholder="请输入正文内容..." allow-paste-html border @change="change" :menu="menuConfig" ref="editify" height="400px" @after-render="afterRender" :paste-keep-marks="{ 'data-zip': ['span'] }" :custom-parse-node="parseNode"></editify>
3
+ <editify v-model="value" placeholder="请输入正文内容..." allow-paste-html border @change="change" :menu="menuConfig" ref="editify" height="400px" @after-render="afterRender" :paste-keep-marks="{ 'data-zip': ['span'] }" :custom-parse-node="parseNode" :renderRules="renderRules"></editify>
4
4
  </div>
5
5
  </template>
6
6
  <script>
@@ -92,7 +92,12 @@ export default {
92
92
  }
93
93
  }
94
94
  },
95
- btn: null
95
+ btn: null,
96
+ renderRules: [
97
+ el => {
98
+ console.log(el)
99
+ }
100
+ ]
96
101
  }
97
102
  },
98
103
  mounted() {
package/lib/editify.es.js CHANGED
@@ -15413,6 +15413,13 @@ const editorProps = {
15413
15413
  pasteKeepStyles: {
15414
15414
  type: Object,
15415
15415
  default: null
15416
+ },
15417
+ //自定义渲染规则
15418
+ renderRules: {
15419
+ type: Array,
15420
+ default: function() {
15421
+ return [];
15422
+ }
15416
15423
  }
15417
15424
  };
15418
15425
  const getColNumbers = (row) => {
@@ -21199,7 +21206,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
21199
21206
  ], 14, _hoisted_1$1);
21200
21207
  }
21201
21208
  const Menu = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-42f60b43"]]);
21202
- const Editify_vue_vue_type_style_index_0_scoped_8415c1dc_lang = "";
21209
+ const Editify_vue_vue_type_style_index_0_scoped_744c85a9_lang = "";
21203
21210
  const _sfc_main = {
21204
21211
  name: "editify",
21205
21212
  props: { ...editorProps },
@@ -21330,7 +21337,8 @@ const _sfc_main = {
21330
21337
  (el) => {
21331
21338
  var _a, _b, _c, _d, _e, _f;
21332
21339
  preHandle.apply(this.editor, [el, ((_a = this.toolbarConfig) == null ? void 0 : _a.use) && ((_d = (_c = (_b = this.toolbarConfig) == null ? void 0 : _b.codeBlock) == null ? void 0 : _c.languages) == null ? void 0 : _d.show), (_f = (_e = this.toolbarConfig) == null ? void 0 : _e.codeBlock) == null ? void 0 : _f.languages.options]);
21333
- }
21340
+ },
21341
+ ...this.renderRules
21334
21342
  ],
21335
21343
  allowCopy: this.allowCopy,
21336
21344
  allowPaste: this.allowPaste,
@@ -22816,7 +22824,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
22816
22824
  ])) : createCommentVNode("", true)
22817
22825
  ]);
22818
22826
  }
22819
- const Editify = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-8415c1dc"]]);
22827
+ const Editify = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-744c85a9"]]);
22820
22828
  const iconfont = "";
22821
22829
  const en_US = {
22822
22830
  textWrapUp: "Up feed",
@@ -22995,7 +23003,7 @@ const i18n = (locale) => {
22995
23003
  return translations[locale][key];
22996
23004
  };
22997
23005
  };
22998
- const version = "0.0.37";
23006
+ const version = "0.0.38";
22999
23007
  const install = (app, props) => {
23000
23008
  const locale = (props ? props.locale : "zh_CN") || "zh_CN";
23001
23009
  app.provide("$editTrans", i18n(locale));