vue-editify 0.1.41 → 0.1.42
Sign up to get free protection for your applications and to get access to all the features.
- package/examples/App.vue +11 -2
- package/lib/editify.es.js +2 -5
- package/lib/editify.umd.js +1 -1
- package/lib/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/core/function.ts +1 -5
- package/src/index.ts +1 -1
package/lib/index.d.ts
CHANGED
@@ -8,7 +8,7 @@ export type { MenuButtonType, MenuSelectButtonType, MenuDisplayButtonType, MenuI
|
|
8
8
|
export type { ElementMatchConfig } from './core/function';
|
9
9
|
export { elementIsMatch, getMatchElementByElement, getMatchElementsByRange, elementIsInList, elementIsInTask, isList, isTask, hasPreInRange, isRangeInPre, hasQuoteInRange, isRangeInQuote, hasListInRange, isRangeInList, hasTaskInRange, isRangeInTask, hasLinkInRange, hasTableInRange, hasImageInRange, hasVideoInRange, queryTextStyle, queryTextMark, getRangeText, setIndentIncrease, setIndentDecrease, setQuote, setAlign, setList, setTask, setTextStyle, setTextMark, removeTextStyle, removeTextMark, setLineHeight, insertLink, insertImage, insertVideo, insertTable, insertCodeBlock } from './core/function';
|
10
10
|
declare const install: FunctionPlugin;
|
11
|
-
declare const version = "0.1.
|
11
|
+
declare const version = "0.1.42";
|
12
12
|
export { AlexElement } from 'alex-editor';
|
13
13
|
export type { AttachmentOptionsType } from './plugins/attachment';
|
14
14
|
export type { InsertAttachmentUploadErrorType } from './plugins/attachment/insertAttachment/props';
|
package/package.json
CHANGED
package/src/core/function.ts
CHANGED
@@ -19,14 +19,10 @@ export type ElementMatchConfig = {
|
|
19
19
|
* @returns
|
20
20
|
*/
|
21
21
|
export const elementIsMatch = (element: AlexElement, config: ElementMatchConfig) => {
|
22
|
-
//如果是文本元素直接返回false
|
23
|
-
if (element.isText()) {
|
24
|
-
return false
|
25
|
-
}
|
26
22
|
//默认是符合的
|
27
23
|
let isMatch = true
|
28
24
|
//如果存在parsedom判断并且parsedom不一样
|
29
|
-
if (config.parsedom && config.parsedom != element.parsedom) {
|
25
|
+
if (config.parsedom && element.parsedom && config.parsedom != element.parsedom) {
|
30
26
|
isMatch = false
|
31
27
|
}
|
32
28
|
//如果存在marks判断
|