@zipify/wysiwyg 4.13.0-beta.0 → 4.13.0
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/cli.js +28 -28
- package/dist/node.js +15 -15
- package/dist/wysiwyg.mjs +2 -2
- package/lib/components/toolbar/ToolbarFloating.vue +2 -2
- package/lib/extensions/StylePreset.js +2 -0
- package/package.json +1 -1
package/dist/wysiwyg.mjs
CHANGED
|
@@ -23721,7 +23721,7 @@ const StylePreset = Extension.create({
|
|
|
23721
23721
|
chain().storeSelection().expandSelectionToBlock().removeMarks(TextBlockMarkList).resetAttributes(NodeType3.PARAGRAPH, TextPresetAttributeSettingList).resetAttributes(NodeType3.HEADING, TextPresetAttributeSettingList).restoreSelection().run();
|
|
23722
23722
|
}),
|
|
23723
23723
|
removeFormat: createCommand(({ chain }) => {
|
|
23724
|
-
chain().storeSelection().expandSelectionToBlock().removeAllMarks().applyDefaultPreset().restoreSelection().run();
|
|
23724
|
+
chain().storeSelection().expandSelectionToBlock().removeAllMarks().applyDefaultPreset().resetAttributes(NodeType3.PARAGRAPH, TextPresetAttributeSettingList).resetAttributes(NodeType3.HEADING, TextPresetAttributeSettingList).restoreSelection().run();
|
|
23725
23725
|
})
|
|
23726
23726
|
};
|
|
23727
23727
|
},
|
|
@@ -30294,7 +30294,7 @@ const _sfc_main$2 = {
|
|
|
30294
30294
|
const middlewares = computed(() => [
|
|
30295
30295
|
offset({ crossAxis: props.offsets[0], mainAxis: props.offsets[1] }),
|
|
30296
30296
|
flip(),
|
|
30297
|
-
shift({ padding: 16,
|
|
30297
|
+
shift({ padding: { top: 16, bottom: 16, left: 2, right: 2 }, crossAxis: true })
|
|
30298
30298
|
]);
|
|
30299
30299
|
const { floatingStyles } = useFloating(referenceRef, floatingRef, {
|
|
30300
30300
|
placement: "top-start",
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
<script setup>
|
|
8
8
|
import { computed, ref, toRef } from 'vue';
|
|
9
|
-
import { useFloating,
|
|
9
|
+
import { useFloating, offset, shift, autoUpdate, flip } from '@floating-ui/vue';
|
|
10
10
|
|
|
11
11
|
const props = defineProps({
|
|
12
12
|
referenceRef: {
|
|
@@ -26,7 +26,7 @@ const referenceRef = toRef(props, 'referenceRef');
|
|
|
26
26
|
const middlewares = computed(() => [
|
|
27
27
|
offset({ crossAxis: props.offsets[0], mainAxis: props.offsets[1] }),
|
|
28
28
|
flip(),
|
|
29
|
-
shift({ padding: 16,
|
|
29
|
+
shift({ padding: { top: 16, bottom: 16, left: 2, right: 2 }, crossAxis: true })
|
|
30
30
|
]);
|
|
31
31
|
|
|
32
32
|
const { floatingStyles } = useFloating(referenceRef, floatingRef, {
|
|
@@ -197,6 +197,8 @@ export const StylePreset = Extension.create({
|
|
|
197
197
|
.expandSelectionToBlock()
|
|
198
198
|
.removeAllMarks()
|
|
199
199
|
.applyDefaultPreset()
|
|
200
|
+
.resetAttributes(NodeType.PARAGRAPH, TextPresetAttributeSettingList)
|
|
201
|
+
.resetAttributes(NodeType.HEADING, TextPresetAttributeSettingList)
|
|
200
202
|
.restoreSelection()
|
|
201
203
|
.run();
|
|
202
204
|
})
|