vue-editify 0.1.39 → 0.1.40
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/lib/editify.es.js +88 -17
- package/lib/editify.umd.js +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/plugins/mathformula/index.d.ts +18 -0
- package/lib/plugins/mathformula/insertMathformula/insertMathformula.vue.d.ts +9 -0
- package/lib/plugins/mathformula/insertMathformula/props.d.ts +4 -0
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/src/editify/editify.less +27 -2
- package/src/index.ts +2 -2
- package/src/plugins/mathformula/index.ts +114 -26
- package/src/plugins/mathformula/insertMathformula/insertMathformula.vue +11 -1
- package/src/plugins/mathformula/insertMathformula/props.ts +5 -0
package/lib/index.d.ts
CHANGED
@@ -7,11 +7,11 @@ export type { InsertVideoUploadErrorType } from './components/insertVideo/props'
|
|
7
7
|
export type { MenuButtonType, MenuSelectButtonType, MenuDisplayButtonType, MenuImageButtonType, MenuVideoButtonType, MenuTableButtonType, MenuCustomButtonType, CodeBlockToolbarType, TextToolbarType, ToolbarConfigType, MenuSequenceType, MenuModeType, MenuExtendType, MenuConfigType, PluginType, PluginResultType } from './core/tool';
|
8
8
|
export { getParsedomElementByElement, getCurrentParsedomElement, 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';
|
9
9
|
declare const install: FunctionPlugin;
|
10
|
-
declare const version = "0.1.
|
10
|
+
declare const version = "0.1.40";
|
11
11
|
export { AlexElement } from 'alex-editor';
|
12
12
|
export type { AttachmentOptionsType } from './plugins/attachment';
|
13
13
|
export type { InsertAttachmentUploadErrorType } from './plugins/attachment/insertAttachment/props';
|
14
14
|
export { attachment, isAttachment, hasAttachmentInRange } from './plugins/attachment';
|
15
15
|
export type { MathformulaOptionsType } from './plugins/mathformula';
|
16
|
-
export { mathformula, isMathformula, isUnderMathformula, getMathformulaElement } from './plugins/mathformula';
|
16
|
+
export { mathformula, isMathformula, isUnderMathformula, getMathformulaElement, hasMathformulaInRange, getMathformulaElementByRange } from './plugins/mathformula';
|
17
17
|
export { install as default, install, Editify, version };
|
@@ -7,6 +7,7 @@ export type MathformulaOptionsType = {
|
|
7
7
|
leftBorder?: boolean;
|
8
8
|
rightBorder?: boolean;
|
9
9
|
disabled?: boolean;
|
10
|
+
handleError?: (error: Error) => void;
|
10
11
|
};
|
11
12
|
/**
|
12
13
|
* 是否公式元素
|
@@ -14,7 +15,17 @@ export type MathformulaOptionsType = {
|
|
14
15
|
* @returns
|
15
16
|
*/
|
16
17
|
export declare const isMathformula: (el: AlexElement) => any;
|
18
|
+
/**
|
19
|
+
* 判断某个元素是否在公式元素内
|
20
|
+
* @param el
|
21
|
+
* @returns
|
22
|
+
*/
|
17
23
|
export declare const isUnderMathformula: (el: AlexElement) => boolean;
|
24
|
+
/**
|
25
|
+
* 根据某个元素获取所在的公式元素,如果不在公式元素内则返回null
|
26
|
+
* @param el
|
27
|
+
* @returns
|
28
|
+
*/
|
18
29
|
export declare const getMathformulaElement: (el: AlexElement) => AlexElement | null;
|
19
30
|
/**
|
20
31
|
* 选区是否含有公式元素
|
@@ -23,6 +34,13 @@ export declare const getMathformulaElement: (el: AlexElement) => AlexElement | n
|
|
23
34
|
* @returns
|
24
35
|
*/
|
25
36
|
export declare const hasMathformulaInRange: (editor: AlexEditor, dataRangeCaches: AlexElementsRangeType) => boolean;
|
37
|
+
/**
|
38
|
+
* 选区是否在某个公式元素下,如果是返回该公式元素否则返回null
|
39
|
+
* @param editor
|
40
|
+
* @param dataRangeCaches
|
41
|
+
* @returns
|
42
|
+
*/
|
43
|
+
export declare const getMathformulaElementByRange: (editor: AlexEditor, dataRangeCaches: AlexElementsRangeType) => AlexElement | null;
|
26
44
|
/**
|
27
45
|
* 数学公式插件
|
28
46
|
* @param options
|
@@ -3,6 +3,10 @@ declare const _default: import('vue').DefineComponent<{
|
|
3
3
|
type: import('vue').PropType<string | null>;
|
4
4
|
default: string;
|
5
5
|
};
|
6
|
+
defaultLaTexContent: {
|
7
|
+
type: StringConstructor;
|
8
|
+
default: string;
|
9
|
+
};
|
6
10
|
}, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
7
11
|
insert: (...args: any[]) => void;
|
8
12
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
@@ -10,9 +14,14 @@ declare const _default: import('vue').DefineComponent<{
|
|
10
14
|
type: import('vue').PropType<string | null>;
|
11
15
|
default: string;
|
12
16
|
};
|
17
|
+
defaultLaTexContent: {
|
18
|
+
type: StringConstructor;
|
19
|
+
default: string;
|
20
|
+
};
|
13
21
|
}>> & {
|
14
22
|
onInsert?: ((...args: any[]) => any) | undefined;
|
15
23
|
}, {
|
16
24
|
color: string | null;
|
25
|
+
defaultLaTexContent: string;
|
17
26
|
}, {}>;
|
18
27
|
export default _default;
|
@@ -5,5 +5,9 @@ export declare const InsertMathformulaProps: {
|
|
5
5
|
type: PropType<string | null>;
|
6
6
|
default: string;
|
7
7
|
};
|
8
|
+
defaultLaTexContent: {
|
9
|
+
type: StringConstructor;
|
10
|
+
default: string;
|
11
|
+
};
|
8
12
|
};
|
9
13
|
export type InsertMathformulaPropsType = ExtractPublicPropTypes<typeof InsertMathformulaProps>;
|