vue-editify 0.1.30 → 0.1.31
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/examples/App.vue +21 -1
- package/lib/editify.es.js +3 -1
- package/lib/editify.umd.js +1 -1
- package/lib/index.d.ts +2 -2
- package/package.json +1 -1
- package/src/index.ts +3 -3
package/examples/App.vue
CHANGED
@@ -19,10 +19,30 @@ const menuConfig = ref<MenuConfigType>({
|
|
19
19
|
}
|
20
20
|
})
|
21
21
|
|
22
|
+
//自定义插件
|
23
|
+
const redPlugin = () => {
|
24
|
+
const plugin: PluginType = () => {
|
25
|
+
return {
|
26
|
+
name: 'red',
|
27
|
+
renderRule: (el: AlexElement) => {
|
28
|
+
if (el.hasStyles()) {
|
29
|
+
el.styles!['color'] = 'red'
|
30
|
+
} else {
|
31
|
+
el.styles = {
|
32
|
+
color: 'red'
|
33
|
+
}
|
34
|
+
}
|
35
|
+
return el
|
36
|
+
}
|
37
|
+
}
|
38
|
+
}
|
39
|
+
return plugin
|
40
|
+
}
|
22
41
|
const plugins = ref<PluginType[]>([
|
23
42
|
attachment({
|
24
43
|
multiple: true
|
25
|
-
})
|
44
|
+
}),
|
45
|
+
redPlugin()
|
26
46
|
])
|
27
47
|
</script>
|
28
48
|
<style lang="less">
|
package/lib/editify.es.js
CHANGED
@@ -26242,7 +26242,7 @@ const attachment = (options) => {
|
|
26242
26242
|
const install = (app) => {
|
26243
26243
|
app.component(Editify.name, Editify);
|
26244
26244
|
};
|
26245
|
-
const version = "0.1.
|
26245
|
+
const version = "0.1.31";
|
26246
26246
|
console.log(`%c vue-editify %c v${version} `, "padding: 2px 1px; border-radius: 3px 0 0 3px; color: #fff; background: #606060; font-weight: bold;", "padding: 2px 1px; border-radius: 0 3px 3px 0; color: #fff; background: #42c02e; font-weight: bold;");
|
26247
26247
|
export {
|
26248
26248
|
AlexElement,
|
@@ -26254,6 +26254,7 @@ export {
|
|
26254
26254
|
getCurrentParsedomElement,
|
26255
26255
|
getParsedomElementByElement,
|
26256
26256
|
getRangeText,
|
26257
|
+
hasAttachmentInRange,
|
26257
26258
|
hasImageInRange,
|
26258
26259
|
hasLinkInRange,
|
26259
26260
|
hasListInRange,
|
@@ -26268,6 +26269,7 @@ export {
|
|
26268
26269
|
insertTable,
|
26269
26270
|
insertVideo,
|
26270
26271
|
install,
|
26272
|
+
isAttachment,
|
26271
26273
|
isList,
|
26272
26274
|
isRangeInList,
|
26273
26275
|
isRangeInPre,
|