vue-editify 0.2.27 → 0.2.29
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 +4 -1
- package/lib/components/button/button.vue.d.ts +216 -28
- package/lib/components/checkbox/checkbox.vue.d.ts +5 -5
- package/lib/components/colors/colors.vue.d.ts +5 -5
- package/lib/components/icon/icon.vue.d.ts +4 -4
- package/lib/components/insertAttachment/insertAttachment.vue.d.ts +6 -6
- package/lib/components/insertImage/insertImage.vue.d.ts +6 -6
- package/lib/components/insertLink/insertLink.vue.d.ts +5 -5
- package/lib/components/insertMathformula/insertMathformula.vue.d.ts +5 -5
- package/lib/components/insertTable/insertTable.vue.d.ts +5 -5
- package/lib/components/insertVideo/insertVideo.vue.d.ts +6 -6
- package/lib/components/layer/layer.vue.d.ts +8 -8
- package/lib/components/tooltip/tooltip.vue.d.ts +4 -4
- package/lib/components/triangle/triangle.vue.d.ts +4 -4
- package/lib/components/updateLink/updateLink.vue.d.ts +5 -5
- package/lib/editify/editify.vue.d.ts +648 -13
- package/lib/editify/menu/menu.vue.d.ts +8 -6
- package/lib/editify/toolbar/toolbar.vue.d.ts +214 -26
- package/lib/editify.es.js +41 -36
- package/lib/editify.umd.js +2 -2
- package/lib/index.d.ts +648 -13
- package/package.json +2 -2
- package/src/editify/editify.less +0 -2
- package/src/editify/editify.vue +21 -9
- package/src/editify/menu/menu.vue +71 -66
- package/src/feature/table.ts +11 -2
- package/src/index.ts +8 -61
package/lib/index.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { App } from 'vue';
|
2
2
|
import { AlexElement } from 'alex-editor';
|
3
3
|
|
4
|
-
declare const Editify: import('./core/tool').SFCWithInstall<import('vue').DefineComponent<{
|
4
|
+
declare const Editify: import('./core/tool').SFCWithInstall<import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
5
5
|
locale: {
|
6
6
|
type: import('vue').PropType<import('./locale').LocaleType>;
|
7
7
|
default: string;
|
@@ -119,7 +119,7 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
119
119
|
type: NumberConstructor;
|
120
120
|
default: number;
|
121
121
|
};
|
122
|
-
}
|
122
|
+
}>, {
|
123
123
|
editor: import('vue').Ref<{
|
124
124
|
$el: HTMLElement;
|
125
125
|
disabled: boolean;
|
@@ -662,10 +662,552 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
662
662
|
on: (eventName: string, eventHandle: (...args: any) => void) => void;
|
663
663
|
off: (eventName: string, eventHandle?: (...args: any) => void) => void;
|
664
664
|
destroy: () => void;
|
665
|
+
} | null, import('alex-editor').default | {
|
666
|
+
$el: HTMLElement;
|
667
|
+
disabled: boolean;
|
668
|
+
value: string;
|
669
|
+
renderRules: ((element: AlexElement) => void)[];
|
670
|
+
allowCopy: boolean;
|
671
|
+
allowPaste: boolean;
|
672
|
+
allowCut: boolean;
|
673
|
+
allowPasteHtml: boolean;
|
674
|
+
customTextPaste: ((text: string) => void | Promise<void>) | null;
|
675
|
+
customHtmlPaste: ((AlexElements: AlexElement[], html: string) => void | Promise<void>) | null;
|
676
|
+
customImagePaste: ((file: File) => void | Promise<void>) | null;
|
677
|
+
customVideoPaste: ((file: File) => void | Promise<void>) | null;
|
678
|
+
customFilePaste: ((file: File) => void | Promise<void>) | null;
|
679
|
+
customMerge: ((mergeElement: AlexElement, targetElement: AlexElement) => void | Promise<void>) | null;
|
680
|
+
customParseNode: ((el: AlexElement) => AlexElement) | null;
|
681
|
+
extraKeepTags: string[];
|
682
|
+
history: {
|
683
|
+
records: {
|
684
|
+
stack: {
|
685
|
+
key: number;
|
686
|
+
type: import('alex-editor').AlexElementType;
|
687
|
+
parsedom: string | null;
|
688
|
+
marks: import('alex-editor').ObjectType | null;
|
689
|
+
styles: import('alex-editor').ObjectType | null;
|
690
|
+
textContent: string | null;
|
691
|
+
children: any[] | null;
|
692
|
+
parent: any | null;
|
693
|
+
behavior: "default" | "block";
|
694
|
+
namespace: string | null;
|
695
|
+
locked: boolean;
|
696
|
+
elm: HTMLElement | null;
|
697
|
+
isBlock: () => boolean;
|
698
|
+
isInblock: () => boolean;
|
699
|
+
isInline: () => boolean;
|
700
|
+
isClosed: () => boolean;
|
701
|
+
isText: () => boolean;
|
702
|
+
isBreak: () => boolean;
|
703
|
+
isEmpty: () => boolean;
|
704
|
+
isSpaceText: () => boolean;
|
705
|
+
getUneditableElement: () => AlexElement | null;
|
706
|
+
isEqual: (element: AlexElement) => boolean;
|
707
|
+
isContains: (element: AlexElement) => boolean;
|
708
|
+
isOnlyHasBreak: () => boolean | 0;
|
709
|
+
isPreStyle: () => boolean;
|
710
|
+
hasMarks: () => boolean;
|
711
|
+
hasStyles: () => boolean;
|
712
|
+
hasChildren: () => boolean;
|
713
|
+
hasContains: (element: AlexElement) => boolean;
|
714
|
+
clone: (deep?: boolean | undefined) => AlexElement;
|
715
|
+
convertToBlock: () => void;
|
716
|
+
toEmpty: () => void;
|
717
|
+
getBlock: () => AlexElement;
|
718
|
+
getInblock: () => AlexElement | null;
|
719
|
+
getInline: () => AlexElement | null;
|
720
|
+
isEqualStyles: (element: AlexElement) => boolean;
|
721
|
+
isEqualMarks: (element: AlexElement) => boolean;
|
722
|
+
isFirst: (element: AlexElement) => boolean;
|
723
|
+
isLast: (element: AlexElement) => boolean;
|
724
|
+
__render: () => void;
|
725
|
+
__fullClone: () => AlexElement;
|
726
|
+
}[];
|
727
|
+
range: {
|
728
|
+
anchor: {
|
729
|
+
element: {
|
730
|
+
key: number;
|
731
|
+
type: import('alex-editor').AlexElementType;
|
732
|
+
parsedom: string | null;
|
733
|
+
marks: import('alex-editor').ObjectType | null;
|
734
|
+
styles: import('alex-editor').ObjectType | null;
|
735
|
+
textContent: string | null;
|
736
|
+
children: any[] | null;
|
737
|
+
parent: any | null;
|
738
|
+
behavior: "default" | "block";
|
739
|
+
namespace: string | null;
|
740
|
+
locked: boolean;
|
741
|
+
elm: HTMLElement | null;
|
742
|
+
isBlock: () => boolean;
|
743
|
+
isInblock: () => boolean;
|
744
|
+
isInline: () => boolean;
|
745
|
+
isClosed: () => boolean;
|
746
|
+
isText: () => boolean;
|
747
|
+
isBreak: () => boolean;
|
748
|
+
isEmpty: () => boolean;
|
749
|
+
isSpaceText: () => boolean;
|
750
|
+
getUneditableElement: () => AlexElement | null;
|
751
|
+
isEqual: (element: AlexElement) => boolean;
|
752
|
+
isContains: (element: AlexElement) => boolean;
|
753
|
+
isOnlyHasBreak: () => boolean | 0;
|
754
|
+
isPreStyle: () => boolean;
|
755
|
+
hasMarks: () => boolean;
|
756
|
+
hasStyles: () => boolean;
|
757
|
+
hasChildren: () => boolean;
|
758
|
+
hasContains: (element: AlexElement) => boolean;
|
759
|
+
clone: (deep?: boolean | undefined) => AlexElement;
|
760
|
+
convertToBlock: () => void;
|
761
|
+
toEmpty: () => void;
|
762
|
+
getBlock: () => AlexElement;
|
763
|
+
getInblock: () => AlexElement | null;
|
764
|
+
getInline: () => AlexElement | null;
|
765
|
+
isEqualStyles: (element: AlexElement) => boolean;
|
766
|
+
isEqualMarks: (element: AlexElement) => boolean;
|
767
|
+
isFirst: (element: AlexElement) => boolean;
|
768
|
+
isLast: (element: AlexElement) => boolean;
|
769
|
+
__render: () => void;
|
770
|
+
__fullClone: () => AlexElement;
|
771
|
+
};
|
772
|
+
offset: number;
|
773
|
+
isEqual: (point: import('alex-editor').AlexPoint) => boolean;
|
774
|
+
moveToEnd: (element: AlexElement) => void;
|
775
|
+
moveToStart: (element: AlexElement) => void;
|
776
|
+
};
|
777
|
+
focus: {
|
778
|
+
element: {
|
779
|
+
key: number;
|
780
|
+
type: import('alex-editor').AlexElementType;
|
781
|
+
parsedom: string | null;
|
782
|
+
marks: import('alex-editor').ObjectType | null;
|
783
|
+
styles: import('alex-editor').ObjectType | null;
|
784
|
+
textContent: string | null;
|
785
|
+
children: any[] | null;
|
786
|
+
parent: any | null;
|
787
|
+
behavior: "default" | "block";
|
788
|
+
namespace: string | null;
|
789
|
+
locked: boolean;
|
790
|
+
elm: HTMLElement | null;
|
791
|
+
isBlock: () => boolean;
|
792
|
+
isInblock: () => boolean;
|
793
|
+
isInline: () => boolean;
|
794
|
+
isClosed: () => boolean;
|
795
|
+
isText: () => boolean;
|
796
|
+
isBreak: () => boolean;
|
797
|
+
isEmpty: () => boolean;
|
798
|
+
isSpaceText: () => boolean;
|
799
|
+
getUneditableElement: () => AlexElement | null;
|
800
|
+
isEqual: (element: AlexElement) => boolean;
|
801
|
+
isContains: (element: AlexElement) => boolean;
|
802
|
+
isOnlyHasBreak: () => boolean | 0;
|
803
|
+
isPreStyle: () => boolean;
|
804
|
+
hasMarks: () => boolean;
|
805
|
+
hasStyles: () => boolean;
|
806
|
+
hasChildren: () => boolean;
|
807
|
+
hasContains: (element: AlexElement) => boolean;
|
808
|
+
clone: (deep?: boolean | undefined) => AlexElement;
|
809
|
+
convertToBlock: () => void;
|
810
|
+
toEmpty: () => void;
|
811
|
+
getBlock: () => AlexElement;
|
812
|
+
getInblock: () => AlexElement | null;
|
813
|
+
getInline: () => AlexElement | null;
|
814
|
+
isEqualStyles: (element: AlexElement) => boolean;
|
815
|
+
isEqualMarks: (element: AlexElement) => boolean;
|
816
|
+
isFirst: (element: AlexElement) => boolean;
|
817
|
+
isLast: (element: AlexElement) => boolean;
|
818
|
+
__render: () => void;
|
819
|
+
__fullClone: () => AlexElement;
|
820
|
+
};
|
821
|
+
offset: number;
|
822
|
+
isEqual: (point: import('alex-editor').AlexPoint) => boolean;
|
823
|
+
moveToEnd: (element: AlexElement) => void;
|
824
|
+
moveToStart: (element: AlexElement) => void;
|
825
|
+
};
|
826
|
+
} | null;
|
827
|
+
}[];
|
828
|
+
redoRecords: {
|
829
|
+
stack: {
|
830
|
+
key: number;
|
831
|
+
type: import('alex-editor').AlexElementType;
|
832
|
+
parsedom: string | null;
|
833
|
+
marks: import('alex-editor').ObjectType | null;
|
834
|
+
styles: import('alex-editor').ObjectType | null;
|
835
|
+
textContent: string | null;
|
836
|
+
children: any[] | null;
|
837
|
+
parent: any | null;
|
838
|
+
behavior: "default" | "block";
|
839
|
+
namespace: string | null;
|
840
|
+
locked: boolean;
|
841
|
+
elm: HTMLElement | null;
|
842
|
+
isBlock: () => boolean;
|
843
|
+
isInblock: () => boolean;
|
844
|
+
isInline: () => boolean;
|
845
|
+
isClosed: () => boolean;
|
846
|
+
isText: () => boolean;
|
847
|
+
isBreak: () => boolean;
|
848
|
+
isEmpty: () => boolean;
|
849
|
+
isSpaceText: () => boolean;
|
850
|
+
getUneditableElement: () => AlexElement | null;
|
851
|
+
isEqual: (element: AlexElement) => boolean;
|
852
|
+
isContains: (element: AlexElement) => boolean;
|
853
|
+
isOnlyHasBreak: () => boolean | 0;
|
854
|
+
isPreStyle: () => boolean;
|
855
|
+
hasMarks: () => boolean;
|
856
|
+
hasStyles: () => boolean;
|
857
|
+
hasChildren: () => boolean;
|
858
|
+
hasContains: (element: AlexElement) => boolean;
|
859
|
+
clone: (deep?: boolean | undefined) => AlexElement;
|
860
|
+
convertToBlock: () => void;
|
861
|
+
toEmpty: () => void;
|
862
|
+
getBlock: () => AlexElement;
|
863
|
+
getInblock: () => AlexElement | null;
|
864
|
+
getInline: () => AlexElement | null;
|
865
|
+
isEqualStyles: (element: AlexElement) => boolean;
|
866
|
+
isEqualMarks: (element: AlexElement) => boolean;
|
867
|
+
isFirst: (element: AlexElement) => boolean;
|
868
|
+
isLast: (element: AlexElement) => boolean;
|
869
|
+
__render: () => void;
|
870
|
+
__fullClone: () => AlexElement;
|
871
|
+
}[];
|
872
|
+
range: {
|
873
|
+
anchor: {
|
874
|
+
element: {
|
875
|
+
key: number;
|
876
|
+
type: import('alex-editor').AlexElementType;
|
877
|
+
parsedom: string | null;
|
878
|
+
marks: import('alex-editor').ObjectType | null;
|
879
|
+
styles: import('alex-editor').ObjectType | null;
|
880
|
+
textContent: string | null;
|
881
|
+
children: any[] | null;
|
882
|
+
parent: any | null;
|
883
|
+
behavior: "default" | "block";
|
884
|
+
namespace: string | null;
|
885
|
+
locked: boolean;
|
886
|
+
elm: HTMLElement | null;
|
887
|
+
isBlock: () => boolean;
|
888
|
+
isInblock: () => boolean;
|
889
|
+
isInline: () => boolean;
|
890
|
+
isClosed: () => boolean;
|
891
|
+
isText: () => boolean;
|
892
|
+
isBreak: () => boolean;
|
893
|
+
isEmpty: () => boolean;
|
894
|
+
isSpaceText: () => boolean;
|
895
|
+
getUneditableElement: () => AlexElement | null;
|
896
|
+
isEqual: (element: AlexElement) => boolean;
|
897
|
+
isContains: (element: AlexElement) => boolean;
|
898
|
+
isOnlyHasBreak: () => boolean | 0;
|
899
|
+
isPreStyle: () => boolean;
|
900
|
+
hasMarks: () => boolean;
|
901
|
+
hasStyles: () => boolean;
|
902
|
+
hasChildren: () => boolean;
|
903
|
+
hasContains: (element: AlexElement) => boolean;
|
904
|
+
clone: (deep?: boolean | undefined) => AlexElement;
|
905
|
+
convertToBlock: () => void;
|
906
|
+
toEmpty: () => void;
|
907
|
+
getBlock: () => AlexElement;
|
908
|
+
getInblock: () => AlexElement | null;
|
909
|
+
getInline: () => AlexElement | null;
|
910
|
+
isEqualStyles: (element: AlexElement) => boolean;
|
911
|
+
isEqualMarks: (element: AlexElement) => boolean;
|
912
|
+
isFirst: (element: AlexElement) => boolean;
|
913
|
+
isLast: (element: AlexElement) => boolean;
|
914
|
+
__render: () => void;
|
915
|
+
__fullClone: () => AlexElement;
|
916
|
+
};
|
917
|
+
offset: number;
|
918
|
+
isEqual: (point: import('alex-editor').AlexPoint) => boolean;
|
919
|
+
moveToEnd: (element: AlexElement) => void;
|
920
|
+
moveToStart: (element: AlexElement) => void;
|
921
|
+
};
|
922
|
+
focus: {
|
923
|
+
element: {
|
924
|
+
key: number;
|
925
|
+
type: import('alex-editor').AlexElementType;
|
926
|
+
parsedom: string | null;
|
927
|
+
marks: import('alex-editor').ObjectType | null;
|
928
|
+
styles: import('alex-editor').ObjectType | null;
|
929
|
+
textContent: string | null;
|
930
|
+
children: any[] | null;
|
931
|
+
parent: any | null;
|
932
|
+
behavior: "default" | "block";
|
933
|
+
namespace: string | null;
|
934
|
+
locked: boolean;
|
935
|
+
elm: HTMLElement | null;
|
936
|
+
isBlock: () => boolean;
|
937
|
+
isInblock: () => boolean;
|
938
|
+
isInline: () => boolean;
|
939
|
+
isClosed: () => boolean;
|
940
|
+
isText: () => boolean;
|
941
|
+
isBreak: () => boolean;
|
942
|
+
isEmpty: () => boolean;
|
943
|
+
isSpaceText: () => boolean;
|
944
|
+
getUneditableElement: () => AlexElement | null;
|
945
|
+
isEqual: (element: AlexElement) => boolean;
|
946
|
+
isContains: (element: AlexElement) => boolean;
|
947
|
+
isOnlyHasBreak: () => boolean | 0;
|
948
|
+
isPreStyle: () => boolean;
|
949
|
+
hasMarks: () => boolean;
|
950
|
+
hasStyles: () => boolean;
|
951
|
+
hasChildren: () => boolean;
|
952
|
+
hasContains: (element: AlexElement) => boolean;
|
953
|
+
clone: (deep?: boolean | undefined) => AlexElement;
|
954
|
+
convertToBlock: () => void;
|
955
|
+
toEmpty: () => void;
|
956
|
+
getBlock: () => AlexElement;
|
957
|
+
getInblock: () => AlexElement | null;
|
958
|
+
getInline: () => AlexElement | null;
|
959
|
+
isEqualStyles: (element: AlexElement) => boolean;
|
960
|
+
isEqualMarks: (element: AlexElement) => boolean;
|
961
|
+
isFirst: (element: AlexElement) => boolean;
|
962
|
+
isLast: (element: AlexElement) => boolean;
|
963
|
+
__render: () => void;
|
964
|
+
__fullClone: () => AlexElement;
|
965
|
+
};
|
966
|
+
offset: number;
|
967
|
+
isEqual: (point: import('alex-editor').AlexPoint) => boolean;
|
968
|
+
moveToEnd: (element: AlexElement) => void;
|
969
|
+
moveToStart: (element: AlexElement) => void;
|
970
|
+
};
|
971
|
+
} | null;
|
972
|
+
}[];
|
973
|
+
cloneRange: (newStack: AlexElement[], range: import('alex-editor').AlexRange | null) => import('alex-editor').AlexRange | null;
|
974
|
+
setState: (stack: AlexElement[], range: import('alex-editor').AlexRange | null) => void;
|
975
|
+
undo: () => import('alex-editor').AlexHistoryRecordType | null;
|
976
|
+
redo: () => import('alex-editor').AlexHistoryRecordType | null;
|
977
|
+
updateRange: (range: import('alex-editor').AlexRange) => void;
|
978
|
+
};
|
979
|
+
stack: {
|
980
|
+
key: number;
|
981
|
+
type: import('alex-editor').AlexElementType;
|
982
|
+
parsedom: string | null;
|
983
|
+
marks: import('alex-editor').ObjectType | null;
|
984
|
+
styles: import('alex-editor').ObjectType | null;
|
985
|
+
textContent: string | null;
|
986
|
+
children: any[] | null;
|
987
|
+
parent: any | null;
|
988
|
+
behavior: "default" | "block";
|
989
|
+
namespace: string | null;
|
990
|
+
locked: boolean;
|
991
|
+
elm: HTMLElement | null;
|
992
|
+
isBlock: () => boolean;
|
993
|
+
isInblock: () => boolean;
|
994
|
+
isInline: () => boolean;
|
995
|
+
isClosed: () => boolean;
|
996
|
+
isText: () => boolean;
|
997
|
+
isBreak: () => boolean;
|
998
|
+
isEmpty: () => boolean;
|
999
|
+
isSpaceText: () => boolean;
|
1000
|
+
getUneditableElement: () => AlexElement | null;
|
1001
|
+
isEqual: (element: AlexElement) => boolean;
|
1002
|
+
isContains: (element: AlexElement) => boolean;
|
1003
|
+
isOnlyHasBreak: () => boolean | 0;
|
1004
|
+
isPreStyle: () => boolean;
|
1005
|
+
hasMarks: () => boolean;
|
1006
|
+
hasStyles: () => boolean;
|
1007
|
+
hasChildren: () => boolean;
|
1008
|
+
hasContains: (element: AlexElement) => boolean;
|
1009
|
+
clone: (deep?: boolean | undefined) => AlexElement;
|
1010
|
+
convertToBlock: () => void;
|
1011
|
+
toEmpty: () => void;
|
1012
|
+
getBlock: () => AlexElement;
|
1013
|
+
getInblock: () => AlexElement | null;
|
1014
|
+
getInline: () => AlexElement | null;
|
1015
|
+
isEqualStyles: (element: AlexElement) => boolean;
|
1016
|
+
isEqualMarks: (element: AlexElement) => boolean;
|
1017
|
+
isFirst: (element: AlexElement) => boolean;
|
1018
|
+
isLast: (element: AlexElement) => boolean;
|
1019
|
+
__render: () => void;
|
1020
|
+
__fullClone: () => AlexElement;
|
1021
|
+
}[];
|
1022
|
+
range: {
|
1023
|
+
anchor: {
|
1024
|
+
element: {
|
1025
|
+
key: number;
|
1026
|
+
type: import('alex-editor').AlexElementType;
|
1027
|
+
parsedom: string | null;
|
1028
|
+
marks: import('alex-editor').ObjectType | null;
|
1029
|
+
styles: import('alex-editor').ObjectType | null;
|
1030
|
+
textContent: string | null;
|
1031
|
+
children: any[] | null;
|
1032
|
+
parent: any | null;
|
1033
|
+
behavior: "default" | "block";
|
1034
|
+
namespace: string | null;
|
1035
|
+
locked: boolean;
|
1036
|
+
elm: HTMLElement | null;
|
1037
|
+
isBlock: () => boolean;
|
1038
|
+
isInblock: () => boolean;
|
1039
|
+
isInline: () => boolean;
|
1040
|
+
isClosed: () => boolean;
|
1041
|
+
isText: () => boolean;
|
1042
|
+
isBreak: () => boolean;
|
1043
|
+
isEmpty: () => boolean;
|
1044
|
+
isSpaceText: () => boolean;
|
1045
|
+
getUneditableElement: () => AlexElement | null;
|
1046
|
+
isEqual: (element: AlexElement) => boolean;
|
1047
|
+
isContains: (element: AlexElement) => boolean;
|
1048
|
+
isOnlyHasBreak: () => boolean | 0;
|
1049
|
+
isPreStyle: () => boolean;
|
1050
|
+
hasMarks: () => boolean;
|
1051
|
+
hasStyles: () => boolean;
|
1052
|
+
hasChildren: () => boolean;
|
1053
|
+
hasContains: (element: AlexElement) => boolean;
|
1054
|
+
clone: (deep?: boolean | undefined) => AlexElement;
|
1055
|
+
convertToBlock: () => void;
|
1056
|
+
toEmpty: () => void;
|
1057
|
+
getBlock: () => AlexElement;
|
1058
|
+
getInblock: () => AlexElement | null;
|
1059
|
+
getInline: () => AlexElement | null;
|
1060
|
+
isEqualStyles: (element: AlexElement) => boolean;
|
1061
|
+
isEqualMarks: (element: AlexElement) => boolean;
|
1062
|
+
isFirst: (element: AlexElement) => boolean;
|
1063
|
+
isLast: (element: AlexElement) => boolean;
|
1064
|
+
__render: () => void;
|
1065
|
+
__fullClone: () => AlexElement;
|
1066
|
+
};
|
1067
|
+
offset: number;
|
1068
|
+
isEqual: (point: import('alex-editor').AlexPoint) => boolean;
|
1069
|
+
moveToEnd: (element: AlexElement) => void;
|
1070
|
+
moveToStart: (element: AlexElement) => void;
|
1071
|
+
};
|
1072
|
+
focus: {
|
1073
|
+
element: {
|
1074
|
+
key: number;
|
1075
|
+
type: import('alex-editor').AlexElementType;
|
1076
|
+
parsedom: string | null;
|
1077
|
+
marks: import('alex-editor').ObjectType | null;
|
1078
|
+
styles: import('alex-editor').ObjectType | null;
|
1079
|
+
textContent: string | null;
|
1080
|
+
children: any[] | null;
|
1081
|
+
parent: any | null;
|
1082
|
+
behavior: "default" | "block";
|
1083
|
+
namespace: string | null;
|
1084
|
+
locked: boolean;
|
1085
|
+
elm: HTMLElement | null;
|
1086
|
+
isBlock: () => boolean;
|
1087
|
+
isInblock: () => boolean;
|
1088
|
+
isInline: () => boolean;
|
1089
|
+
isClosed: () => boolean;
|
1090
|
+
isText: () => boolean;
|
1091
|
+
isBreak: () => boolean;
|
1092
|
+
isEmpty: () => boolean;
|
1093
|
+
isSpaceText: () => boolean;
|
1094
|
+
getUneditableElement: () => AlexElement | null;
|
1095
|
+
isEqual: (element: AlexElement) => boolean;
|
1096
|
+
isContains: (element: AlexElement) => boolean;
|
1097
|
+
isOnlyHasBreak: () => boolean | 0;
|
1098
|
+
isPreStyle: () => boolean;
|
1099
|
+
hasMarks: () => boolean;
|
1100
|
+
hasStyles: () => boolean;
|
1101
|
+
hasChildren: () => boolean;
|
1102
|
+
hasContains: (element: AlexElement) => boolean;
|
1103
|
+
clone: (deep?: boolean | undefined) => AlexElement;
|
1104
|
+
convertToBlock: () => void;
|
1105
|
+
toEmpty: () => void;
|
1106
|
+
getBlock: () => AlexElement;
|
1107
|
+
getInblock: () => AlexElement | null;
|
1108
|
+
getInline: () => AlexElement | null;
|
1109
|
+
isEqualStyles: (element: AlexElement) => boolean;
|
1110
|
+
isEqualMarks: (element: AlexElement) => boolean;
|
1111
|
+
isFirst: (element: AlexElement) => boolean;
|
1112
|
+
isLast: (element: AlexElement) => boolean;
|
1113
|
+
__render: () => void;
|
1114
|
+
__fullClone: () => AlexElement;
|
1115
|
+
};
|
1116
|
+
offset: number;
|
1117
|
+
isEqual: (point: import('alex-editor').AlexPoint) => boolean;
|
1118
|
+
moveToEnd: (element: AlexElement) => void;
|
1119
|
+
moveToStart: (element: AlexElement) => void;
|
1120
|
+
};
|
1121
|
+
} | null;
|
1122
|
+
__guid: number;
|
1123
|
+
__events: {
|
1124
|
+
[key: string]: ((...args: any) => void)[];
|
1125
|
+
};
|
1126
|
+
__oldStack: {
|
1127
|
+
key: number;
|
1128
|
+
type: import('alex-editor').AlexElementType;
|
1129
|
+
parsedom: string | null;
|
1130
|
+
marks: import('alex-editor').ObjectType | null;
|
1131
|
+
styles: import('alex-editor').ObjectType | null;
|
1132
|
+
textContent: string | null;
|
1133
|
+
children: any[] | null;
|
1134
|
+
parent: any | null;
|
1135
|
+
behavior: "default" | "block";
|
1136
|
+
namespace: string | null;
|
1137
|
+
locked: boolean;
|
1138
|
+
elm: HTMLElement | null;
|
1139
|
+
isBlock: () => boolean;
|
1140
|
+
isInblock: () => boolean;
|
1141
|
+
isInline: () => boolean;
|
1142
|
+
isClosed: () => boolean;
|
1143
|
+
isText: () => boolean;
|
1144
|
+
isBreak: () => boolean;
|
1145
|
+
isEmpty: () => boolean;
|
1146
|
+
isSpaceText: () => boolean;
|
1147
|
+
getUneditableElement: () => AlexElement | null;
|
1148
|
+
isEqual: (element: AlexElement) => boolean;
|
1149
|
+
isContains: (element: AlexElement) => boolean;
|
1150
|
+
isOnlyHasBreak: () => boolean | 0;
|
1151
|
+
isPreStyle: () => boolean;
|
1152
|
+
hasMarks: () => boolean;
|
1153
|
+
hasStyles: () => boolean;
|
1154
|
+
hasChildren: () => boolean;
|
1155
|
+
hasContains: (element: AlexElement) => boolean;
|
1156
|
+
clone: (deep?: boolean | undefined) => AlexElement;
|
1157
|
+
convertToBlock: () => void;
|
1158
|
+
toEmpty: () => void;
|
1159
|
+
getBlock: () => AlexElement;
|
1160
|
+
getInblock: () => AlexElement | null;
|
1161
|
+
getInline: () => AlexElement | null;
|
1162
|
+
isEqualStyles: (element: AlexElement) => boolean;
|
1163
|
+
isEqualMarks: (element: AlexElement) => boolean;
|
1164
|
+
isFirst: (element: AlexElement) => boolean;
|
1165
|
+
isLast: (element: AlexElement) => boolean;
|
1166
|
+
__render: () => void;
|
1167
|
+
__fullClone: () => AlexElement;
|
1168
|
+
}[];
|
1169
|
+
__isInputChinese: boolean;
|
1170
|
+
__innerSelectionChange: boolean;
|
1171
|
+
__chineseInputTimer: any;
|
1172
|
+
__domObserver: {
|
1173
|
+
disconnect: () => void;
|
1174
|
+
observe: (target: Node, options?: MutationObserverInit) => void;
|
1175
|
+
takeRecords: () => MutationRecord[];
|
1176
|
+
} | null;
|
1177
|
+
__illegalDoms: Node[];
|
1178
|
+
initRange: () => void;
|
1179
|
+
delete: () => void;
|
1180
|
+
insertText: (data: string) => void;
|
1181
|
+
insertParagraph: () => void;
|
1182
|
+
insertElement: (ele: AlexElement, cover?: boolean | undefined) => void;
|
1183
|
+
domRender: (unPushHistory?: boolean | undefined) => void;
|
1184
|
+
rangeRender: () => Promise<void>;
|
1185
|
+
parseHtml: (html: string) => AlexElement[];
|
1186
|
+
parseNode: (node: HTMLElement) => AlexElement;
|
1187
|
+
merge: (ele: AlexElement, previousEle: AlexElement) => void;
|
1188
|
+
getElementByKey: (key: number) => AlexElement | null;
|
1189
|
+
getPreviousElement: (ele: AlexElement) => AlexElement | null;
|
1190
|
+
getNextElement: (ele: AlexElement) => AlexElement | null;
|
1191
|
+
getPreviousElementOfPoint: (point: import('alex-editor').AlexPoint) => AlexElement | null;
|
1192
|
+
getNextElementOfPoint: (point: import('alex-editor').AlexPoint) => AlexElement | null;
|
1193
|
+
getElementsByRange: () => import('alex-editor').AlexElementsRangeType;
|
1194
|
+
addElementTo: (childEle: AlexElement, parentEle: AlexElement, index?: number | undefined) => void;
|
1195
|
+
addElementBefore: (newEle: AlexElement, targetEle: AlexElement) => void;
|
1196
|
+
addElementAfter: (newEle: AlexElement, targetEle: AlexElement) => void;
|
1197
|
+
collapseToStart: (element?: AlexElement) => void;
|
1198
|
+
collapseToEnd: (element?: AlexElement) => void;
|
1199
|
+
setDisabled: () => void;
|
1200
|
+
setEnabled: () => void;
|
1201
|
+
undo: () => void;
|
1202
|
+
redo: () => void;
|
1203
|
+
emit: (eventName: string, ...value: any) => boolean;
|
1204
|
+
on: (eventName: string, eventHandle: (...args: any) => void) => void;
|
1205
|
+
off: (eventName: string, eventHandle?: (...args: any) => void) => void;
|
1206
|
+
destroy: () => void;
|
665
1207
|
} | null>;
|
666
|
-
isSourceView: import('vue').Ref<boolean>;
|
667
|
-
isFullScreen: import('vue').Ref<boolean>;
|
668
|
-
rangeKey: import('vue').Ref<number | null>;
|
1208
|
+
isSourceView: import('vue').Ref<boolean, boolean>;
|
1209
|
+
isFullScreen: import('vue').Ref<boolean, boolean>;
|
1210
|
+
rangeKey: import('vue').Ref<number | null, number | null>;
|
669
1211
|
dataRangeCaches: import('vue').Ref<{
|
670
1212
|
list: {
|
671
1213
|
element: {
|
@@ -759,12 +1301,105 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
759
1301
|
};
|
760
1302
|
offset: number[] | false;
|
761
1303
|
}[];
|
1304
|
+
}, import('alex-editor').AlexElementsRangeType | {
|
1305
|
+
list: {
|
1306
|
+
element: {
|
1307
|
+
key: number;
|
1308
|
+
type: import('alex-editor').AlexElementType;
|
1309
|
+
parsedom: string | null;
|
1310
|
+
marks: import('alex-editor').ObjectType | null;
|
1311
|
+
styles: import('alex-editor').ObjectType | null;
|
1312
|
+
textContent: string | null;
|
1313
|
+
children: any[] | null;
|
1314
|
+
parent: any | null;
|
1315
|
+
behavior: "default" | "block";
|
1316
|
+
namespace: string | null;
|
1317
|
+
locked: boolean;
|
1318
|
+
elm: HTMLElement | null;
|
1319
|
+
isBlock: () => boolean;
|
1320
|
+
isInblock: () => boolean;
|
1321
|
+
isInline: () => boolean;
|
1322
|
+
isClosed: () => boolean;
|
1323
|
+
isText: () => boolean;
|
1324
|
+
isBreak: () => boolean;
|
1325
|
+
isEmpty: () => boolean;
|
1326
|
+
isSpaceText: () => boolean;
|
1327
|
+
getUneditableElement: () => AlexElement | null;
|
1328
|
+
isEqual: (element: AlexElement) => boolean;
|
1329
|
+
isContains: (element: AlexElement) => boolean;
|
1330
|
+
isOnlyHasBreak: () => boolean | 0;
|
1331
|
+
isPreStyle: () => boolean;
|
1332
|
+
hasMarks: () => boolean;
|
1333
|
+
hasStyles: () => boolean;
|
1334
|
+
hasChildren: () => boolean;
|
1335
|
+
hasContains: (element: AlexElement) => boolean;
|
1336
|
+
clone: (deep?: boolean | undefined) => AlexElement;
|
1337
|
+
convertToBlock: () => void;
|
1338
|
+
toEmpty: () => void;
|
1339
|
+
getBlock: () => AlexElement;
|
1340
|
+
getInblock: () => AlexElement | null;
|
1341
|
+
getInline: () => AlexElement | null;
|
1342
|
+
isEqualStyles: (element: AlexElement) => boolean;
|
1343
|
+
isEqualMarks: (element: AlexElement) => boolean;
|
1344
|
+
isFirst: (element: AlexElement) => boolean;
|
1345
|
+
isLast: (element: AlexElement) => boolean;
|
1346
|
+
__render: () => void;
|
1347
|
+
__fullClone: () => AlexElement;
|
1348
|
+
};
|
1349
|
+
offset: number[] | false;
|
1350
|
+
}[];
|
1351
|
+
flatList: {
|
1352
|
+
element: {
|
1353
|
+
key: number;
|
1354
|
+
type: import('alex-editor').AlexElementType;
|
1355
|
+
parsedom: string | null;
|
1356
|
+
marks: import('alex-editor').ObjectType | null;
|
1357
|
+
styles: import('alex-editor').ObjectType | null;
|
1358
|
+
textContent: string | null;
|
1359
|
+
children: any[] | null;
|
1360
|
+
parent: any | null;
|
1361
|
+
behavior: "default" | "block";
|
1362
|
+
namespace: string | null;
|
1363
|
+
locked: boolean;
|
1364
|
+
elm: HTMLElement | null;
|
1365
|
+
isBlock: () => boolean;
|
1366
|
+
isInblock: () => boolean;
|
1367
|
+
isInline: () => boolean;
|
1368
|
+
isClosed: () => boolean;
|
1369
|
+
isText: () => boolean;
|
1370
|
+
isBreak: () => boolean;
|
1371
|
+
isEmpty: () => boolean;
|
1372
|
+
isSpaceText: () => boolean;
|
1373
|
+
getUneditableElement: () => AlexElement | null;
|
1374
|
+
isEqual: (element: AlexElement) => boolean;
|
1375
|
+
isContains: (element: AlexElement) => boolean;
|
1376
|
+
isOnlyHasBreak: () => boolean | 0;
|
1377
|
+
isPreStyle: () => boolean;
|
1378
|
+
hasMarks: () => boolean;
|
1379
|
+
hasStyles: () => boolean;
|
1380
|
+
hasChildren: () => boolean;
|
1381
|
+
hasContains: (element: AlexElement) => boolean;
|
1382
|
+
clone: (deep?: boolean | undefined) => AlexElement;
|
1383
|
+
convertToBlock: () => void;
|
1384
|
+
toEmpty: () => void;
|
1385
|
+
getBlock: () => AlexElement;
|
1386
|
+
getInblock: () => AlexElement | null;
|
1387
|
+
getInline: () => AlexElement | null;
|
1388
|
+
isEqualStyles: (element: AlexElement) => boolean;
|
1389
|
+
isEqualMarks: (element: AlexElement) => boolean;
|
1390
|
+
isFirst: (element: AlexElement) => boolean;
|
1391
|
+
isLast: (element: AlexElement) => boolean;
|
1392
|
+
__render: () => void;
|
1393
|
+
__fullClone: () => AlexElement;
|
1394
|
+
};
|
1395
|
+
offset: number[] | false;
|
1396
|
+
}[];
|
762
1397
|
}>;
|
763
1398
|
textValue: import('vue').ComputedRef<string>;
|
764
1399
|
menuHeight: import('vue').ComputedRef<number | null>;
|
765
1400
|
collapseToEnd: () => void;
|
766
1401
|
collapseToStart: () => void;
|
767
|
-
},
|
1402
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
768
1403
|
change: (...args: any[]) => void;
|
769
1404
|
blur: (...args: any[]) => void;
|
770
1405
|
focus: (...args: any[]) => void;
|
@@ -892,17 +1527,17 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
892
1527
|
type: NumberConstructor;
|
893
1528
|
default: number;
|
894
1529
|
};
|
895
|
-
}>> & {
|
896
|
-
onFocus?: ((...args: any[]) => any) | undefined;
|
897
|
-
onBlur?: ((...args: any[]) => any) | undefined;
|
1530
|
+
}>> & Readonly<{
|
898
1531
|
onChange?: ((...args: any[]) => any) | undefined;
|
1532
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
1533
|
+
onFocus?: ((...args: any[]) => any) | undefined;
|
1534
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
899
1535
|
onKeydown?: ((...args: any[]) => any) | undefined;
|
900
1536
|
onKeyup?: ((...args: any[]) => any) | undefined;
|
901
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
902
1537
|
onInsertparagraph?: ((...args: any[]) => any) | undefined;
|
903
1538
|
onRangeupdate?: ((...args: any[]) => any) | undefined;
|
904
1539
|
onUpdateview?: ((...args: any[]) => any) | undefined;
|
905
|
-
}
|
1540
|
+
}>, {
|
906
1541
|
color: string;
|
907
1542
|
disabled: boolean;
|
908
1543
|
zIndex: number;
|
@@ -932,7 +1567,7 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
932
1567
|
autoheight: boolean;
|
933
1568
|
dark: boolean;
|
934
1569
|
offset: number;
|
935
|
-
}, {}>>;
|
1570
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>>;
|
936
1571
|
export type * from './components/button';
|
937
1572
|
export type * from './components/checkbox';
|
938
1573
|
export type * from './components/colors';
|
@@ -951,5 +1586,5 @@ export type * from './editify/menu';
|
|
951
1586
|
export type * from './editify/toolbar';
|
952
1587
|
export { elementIsMatch, getMatchElementByElement, getMatchElementByRange, elementIsList, getListByElement, hasListInRange, rangeIsInList, elementIsTask, getTaskByElement, hasTaskInRange, rangeIsInTask, elementIsAttachment, hasAttachmentInRange, elementIsMathformula, getMathformulaByElement, hasMathformulaInRange, elementIsInfoBlock, getInfoBlockByElement, hasInfoBlockInRange, rangeIsInInfoBlock, hasPreInRange, hasTableInRange, hasQuoteInRange, rangeIsInQuote, hasLinkInRange, hasImageInRange, hasVideoInRange, queryTextStyle, setTextStyle, removeTextStyle, queryTextMark, setTextMark, removeTextMark, getRangeText, addSpaceTextToBothSides, setHeading, setIndentIncrease, setIndentDecrease, setQuote, setAlign, setList, setTask, setLineHeight, insertLink, insertImage, insertVideo, insertTable, insertCodeBlock, insertSeparator, insertAttachment, insertMathformula, insertInfoBlock } from './core/function';
|
953
1588
|
declare const install: (app: App) => void;
|
954
|
-
declare const version = "0.2.
|
1589
|
+
declare const version = "0.2.29";
|
955
1590
|
export { Editify as default, Editify, install, AlexElement, version };
|