@zipify/wysiwyg 1.0.0-dev.84 → 1.0.0-dev.85
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/dist/wysiwyg.mjs +3 -9
- package/lib/Wysiwyg.vue +0 -8
- package/lib/composables/useToolbar.js +3 -5
- package/package.json +1 -1
package/dist/wysiwyg.mjs
CHANGED
|
@@ -22824,7 +22824,7 @@ function useEditor({ content, onChange, extensions: extensions2, isReadonlyRef }
|
|
|
22824
22824
|
watch(isReadonlyRef, (isReadonly) => editor.setEditable(!isReadonly), { immediate: true });
|
|
22825
22825
|
return editor;
|
|
22826
22826
|
}
|
|
22827
|
-
function useToolbar({ wrapperRef,
|
|
22827
|
+
function useToolbar({ wrapperRef, offsets, isActiveRef }) {
|
|
22828
22828
|
const wrapperEl = useElementRef(wrapperRef);
|
|
22829
22829
|
let popper2;
|
|
22830
22830
|
function mount(element) {
|
|
@@ -22839,13 +22839,12 @@ function useToolbar({ wrapperRef, scrollerRootRef, offsets, isActiveRef }) {
|
|
|
22839
22839
|
name: "preventOverflow",
|
|
22840
22840
|
options: {
|
|
22841
22841
|
altAxis: true,
|
|
22842
|
-
padding: 2
|
|
22843
|
-
boundary: ContextWindow.window
|
|
22842
|
+
padding: 2
|
|
22844
22843
|
}
|
|
22845
22844
|
},
|
|
22846
22845
|
{
|
|
22847
22846
|
name: "flip",
|
|
22848
|
-
options: {
|
|
22847
|
+
options: { enabled: false }
|
|
22849
22848
|
}
|
|
22850
22849
|
]
|
|
22851
22850
|
});
|
|
@@ -25906,10 +25905,6 @@ const __vue2_script = {
|
|
|
25906
25905
|
window: {
|
|
25907
25906
|
required: false,
|
|
25908
25907
|
default: () => window
|
|
25909
|
-
},
|
|
25910
|
-
scrollerRoot: {
|
|
25911
|
-
required: false,
|
|
25912
|
-
default: () => document.body
|
|
25913
25908
|
}
|
|
25914
25909
|
},
|
|
25915
25910
|
emits: [
|
|
@@ -25928,7 +25923,6 @@ const __vue2_script = {
|
|
|
25928
25923
|
const isToolbarActiveRef = computed(() => props.active && !props.readonly);
|
|
25929
25924
|
const toolbar = useToolbar({
|
|
25930
25925
|
wrapperRef: wysiwygRef,
|
|
25931
|
-
scrollerRootRef: toRef(props, "scrollerRoot"),
|
|
25932
25926
|
isActiveRef: isToolbarActiveRef,
|
|
25933
25927
|
offsets: props.toolbarOffsets
|
|
25934
25928
|
});
|
package/lib/Wysiwyg.vue
CHANGED
|
@@ -125,13 +125,6 @@ export default {
|
|
|
125
125
|
window: {
|
|
126
126
|
required: false,
|
|
127
127
|
default: () => window
|
|
128
|
-
},
|
|
129
|
-
|
|
130
|
-
// Requires HTMLElement type but it different in iframe and outside
|
|
131
|
-
// eslint-disable-next-line vue/require-prop-types
|
|
132
|
-
scrollerRoot: {
|
|
133
|
-
required: false,
|
|
134
|
-
default: () => document.body
|
|
135
128
|
}
|
|
136
129
|
},
|
|
137
130
|
|
|
@@ -151,7 +144,6 @@ export default {
|
|
|
151
144
|
|
|
152
145
|
const toolbar = useToolbar({
|
|
153
146
|
wrapperRef: wysiwygRef,
|
|
154
|
-
scrollerRootRef: toRef(props, 'scrollerRoot'),
|
|
155
147
|
isActiveRef: isToolbarActiveRef,
|
|
156
148
|
offsets: props.toolbarOffsets
|
|
157
149
|
});
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { createPopper } from '@popperjs/core';
|
|
2
2
|
import { useElementRef } from '../components/base';
|
|
3
|
-
import { ContextWindow } from '../services';
|
|
4
3
|
|
|
5
|
-
export function useToolbar({ wrapperRef,
|
|
4
|
+
export function useToolbar({ wrapperRef, offsets, isActiveRef }) {
|
|
6
5
|
const wrapperEl = useElementRef(wrapperRef);
|
|
7
6
|
let popper;
|
|
8
7
|
|
|
@@ -18,13 +17,12 @@ export function useToolbar({ wrapperRef, scrollerRootRef, offsets, isActiveRef }
|
|
|
18
17
|
name: 'preventOverflow',
|
|
19
18
|
options: {
|
|
20
19
|
altAxis: true,
|
|
21
|
-
padding: 2
|
|
22
|
-
boundary: ContextWindow.window
|
|
20
|
+
padding: 2
|
|
23
21
|
}
|
|
24
22
|
},
|
|
25
23
|
{
|
|
26
24
|
name: 'flip',
|
|
27
|
-
options: {
|
|
25
|
+
options: { enabled: false }
|
|
28
26
|
}
|
|
29
27
|
]
|
|
30
28
|
});
|