@zipify/wysiwyg 1.0.0-dev.18 → 1.0.0-dev.20

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.
@@ -6,7 +6,8 @@ export function useEditor({ content, onChange, extensions }) {
6
6
  const editor = reactive(new Editor({
7
7
  content: ContentNormalizer.normalize(content.value),
8
8
  onUpdate: () => onChange(editor.getJSON()),
9
- extensions
9
+ extensions,
10
+ injectCSS: false
10
11
  }));
11
12
 
12
13
  onUnmounted(() => editor.destroy());
@@ -45,3 +45,82 @@
45
45
  line-height: var(--zw-line-height-mobile, var(--zw-preset-mobile-line-height));
46
46
  }
47
47
  }
48
+
49
+ /* ProseMirror styles */
50
+
51
+ .ProseMirror {
52
+ position: relative;
53
+ }
54
+
55
+ .ProseMirror {
56
+ word-wrap: break-word;
57
+ white-space: pre-wrap;
58
+ white-space: break-spaces;
59
+ -webkit-font-variant-ligatures: none;
60
+ font-variant-ligatures: none;
61
+ font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
62
+ }
63
+
64
+ .ProseMirror [contenteditable="false"] {
65
+ white-space: normal;
66
+ }
67
+
68
+ .ProseMirror [contenteditable="false"] [contenteditable="true"] {
69
+ white-space: pre-wrap;
70
+ }
71
+
72
+ .ProseMirror pre {
73
+ white-space: pre-wrap;
74
+ }
75
+
76
+ img.ProseMirror-separator {
77
+ display: inline !important;
78
+ border: none !important;
79
+ margin: 0 !important;
80
+ width: 1px !important;
81
+ height: 1px !important;
82
+ }
83
+
84
+ .ProseMirror-gapcursor {
85
+ display: none;
86
+ pointer-events: none;
87
+ position: absolute;
88
+ margin: 0;
89
+ }
90
+
91
+ .ProseMirror-gapcursor::after {
92
+ content: "";
93
+ display: block;
94
+ position: absolute;
95
+ top: -2px;
96
+ width: 20px;
97
+ border-top: 1px solid #000;
98
+ animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
99
+ }
100
+
101
+ @keyframes ProseMirror-cursor-blink {
102
+
103
+ to {
104
+ visibility: hidden;
105
+ }
106
+ }
107
+
108
+ .ProseMirror-hideselection *::selection {
109
+ background: transparent;
110
+ }
111
+
112
+ .ProseMirror-hideselection *::-moz-selection {
113
+ background: transparent;
114
+ }
115
+
116
+ .ProseMirror-hideselection * {
117
+ caret-color: transparent;
118
+ }
119
+
120
+ .ProseMirror-focused .ProseMirror-gapcursor {
121
+ display: block;
122
+ }
123
+
124
+ .tippy-box[data-animation=fade][data-state=hidden] {
125
+ opacity: 0
126
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zipify/wysiwyg",
3
- "version": "1.0.0-dev.18",
3
+ "version": "1.0.0-dev.20",
4
4
  "description": "Zipify modification of TipTap text editor",
5
5
  "main": "dist/wysiwyg.js",
6
6
  "repository": {