zydx-plus 1.32.261 → 1.32.262

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zydx-plus",
3
- "version": "1.32.261",
3
+ "version": "1.32.262",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -0,0 +1,33 @@
1
+ import { Extension } from '@tiptap/core'
2
+
3
+ export const Contenteditable = Extension.create({
4
+ name: 'Contenteditable',
5
+
6
+ addOptions() {
7
+ return {
8
+ types: ['heading', 'paragraph','textStyle'],
9
+ }
10
+ },
11
+
12
+ addGlobalAttributes() {
13
+ return [
14
+ {
15
+ types: this.options.types,
16
+ attributes: {
17
+ cont: {
18
+ default: null,
19
+ parseHTML: element => element.getAttribute('contenteditable'),
20
+ renderHTML: attributes => {
21
+ if (!attributes.cont) {
22
+ return {}
23
+ }
24
+ return {
25
+ 'contenteditable': attributes.cont,
26
+ }
27
+ },
28
+ },
29
+ },
30
+ },
31
+ ]
32
+ }
33
+ })
@@ -106,6 +106,7 @@ import textStyle from '@tiptap/extension-text-style'
106
106
  import {sid} from "./sign-id";
107
107
  import {FontSize} from "./font-size";
108
108
  import {titleId} from "./title-id";
109
+ import {Contenteditable} from "./contenteditable";
109
110
  import svgs from "./level";
110
111
 
111
112
  export default {
@@ -288,6 +289,7 @@ export default {
288
289
  textStyle,
289
290
  FontSize,
290
291
  titleId,
292
+ Contenteditable,
291
293
  Color.configure({
292
294
  types: ['textStyle'],
293
295
  }),
@@ -707,6 +709,13 @@ export default {
707
709
  </script>
708
710
 
709
711
  <style scoped>
712
+ :deep(p[data-sid="prohibit"]) {
713
+ -webkit-user-select: none;
714
+ -moz-user-select: none;
715
+ -ms-user-select: none;
716
+ user-select: none;
717
+ pointer-events: none;
718
+ }
710
719
  .speak{
711
720
  position: fixed;
712
721
  top: 0;
package/src/index.js CHANGED
@@ -79,7 +79,7 @@ function install(app) {
79
79
  }
80
80
 
81
81
  export default {
82
- version: '1.32.261',
82
+ version: '1.32.262',
83
83
  install,
84
84
  Calendar,
85
85
  Message,