vue-editify 0.1.13 → 0.1.15
Sign up to get free protection for your applications and to get access to all the features.
- package/examples/App.vue +8 -12
- package/lib/editify.es.js +10 -1
- package/lib/editify.umd.js +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/src/core/rule.ts +9 -0
- package/src/css/base.less +1 -1
- package/src/editify/editify.less +0 -1
- package/src/index.ts +1 -1
package/examples/App.vue
CHANGED
@@ -1,31 +1,27 @@
|
|
1
1
|
<template>
|
2
|
-
<div style="padding: 10px; height: 100%; box-sizing: border-box">
|
3
|
-
<
|
4
|
-
<Editify ref="editify" border v-model="val" :menu="menuConfig" style="height: 400px"></Editify>
|
2
|
+
<div style="padding: 80px 10px 10px 10px; height: 100%; box-sizing: border-box">
|
3
|
+
<Editify ref="editify" border v-model="val" :menu="menuConfig" style="height: 100%" placeholder="Please Enter Text..." locale="zh_CN"></Editify>
|
5
4
|
</div>
|
6
5
|
</template>
|
7
6
|
<script setup lang="ts">
|
8
7
|
import { ref } from 'vue'
|
9
|
-
import {
|
10
|
-
import { MenuConfigType } from '../src/
|
8
|
+
import { Editify } from '../src/index'
|
9
|
+
import { MenuConfigType } from '../src/index'
|
11
10
|
const val = ref<string>('<p><br></p>')
|
12
11
|
const editify = ref<InstanceType<typeof Editify> | null>(null)
|
13
12
|
const menuConfig = ref<MenuConfigType>({
|
14
13
|
use: true,
|
15
|
-
mode: '
|
14
|
+
mode: 'fixed',
|
16
15
|
image: {
|
17
16
|
accept: ['jpg'],
|
18
17
|
handleError: (error, file) => {
|
19
18
|
console.log(error, file)
|
20
19
|
}
|
20
|
+
},
|
21
|
+
fullScreen: {
|
22
|
+
show: true
|
21
23
|
}
|
22
24
|
})
|
23
|
-
const handleClick = () => {
|
24
|
-
setIndentIncrease(editify.value!.editor!, editify.value!.dataRangeCaches)
|
25
|
-
editify.value!.editor!.formatElementStack()
|
26
|
-
editify.value!.editor!.domRender()
|
27
|
-
editify.value!.editor!.rangeRender()
|
28
|
-
}
|
29
25
|
</script>
|
30
26
|
<style lang="less">
|
31
27
|
html,
|
package/lib/editify.es.js
CHANGED
@@ -19655,6 +19655,15 @@ const tableHandle = function(editor, element2) {
|
|
19655
19655
|
} else {
|
19656
19656
|
element2.marks = marks;
|
19657
19657
|
}
|
19658
|
+
const styles = {
|
19659
|
+
"white-space": "pre-wrap",
|
19660
|
+
"word-break": "break-word"
|
19661
|
+
};
|
19662
|
+
if (element2.hasStyles()) {
|
19663
|
+
Object.assign(element2.styles, styles);
|
19664
|
+
} else {
|
19665
|
+
element2.styles = styles;
|
19666
|
+
}
|
19658
19667
|
const elements = AlexElement.flatElements(element2.children);
|
19659
19668
|
const rows = elements.filter((el) => {
|
19660
19669
|
return el.parsedom == "tr";
|
@@ -25570,7 +25579,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
25570
25579
|
}
|
25571
25580
|
});
|
25572
25581
|
const Editify = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-99f85ef5"]]);
|
25573
|
-
const version = "0.1.
|
25582
|
+
const version = "0.1.15";
|
25574
25583
|
const install = (app) => {
|
25575
25584
|
app.component(Editify.name, Editify);
|
25576
25585
|
};
|