reactjs-tiptap-editor 0.2.12 → 0.2.13
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/{RichTextEditor-DJJ5SBya.cjs → RichTextEditor-DBjHuER_.cjs} +92 -89
- package/lib/{RichTextEditor-CIenLXbH.js → RichTextEditor-DqXFuGeI.js} +91 -88
- package/lib/extension-bundle.cjs +1 -1
- package/lib/extension-bundle.d.cts +65 -65
- package/lib/extension-bundle.d.ts +65 -65
- package/lib/extension-bundle.js +5 -4
- package/lib/index.cjs +1 -1
- package/lib/index.d.cts +65 -65
- package/lib/index.d.ts +65 -65
- package/lib/index.js +2 -2
- package/lib/locale-bundle.d.cts +65 -65
- package/lib/locale-bundle.d.ts +65 -65
- package/lib/style.css +1 -1
- package/lib/{tiptap-DKUVyykT.js → tiptap-24JNJPT1.js} +204 -203
- package/lib/{tiptap-BjxGiEhB.cjs → tiptap-DaE4Kxno.cjs} +12 -12
- package/package.json +54 -54
|
@@ -698,36 +698,6 @@ declare module '@tiptap/core' {
|
|
|
698
698
|
}
|
|
699
699
|
|
|
700
700
|
|
|
701
|
-
declare module '@tiptap/core' {
|
|
702
|
-
interface Commands<ReturnType> {
|
|
703
|
-
lineHeight: {
|
|
704
|
-
setLineHeight: (lineHeight: string) => ReturnType;
|
|
705
|
-
unsetLineHeight: () => ReturnType;
|
|
706
|
-
};
|
|
707
|
-
}
|
|
708
|
-
}
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
declare module '@tiptap/core' {
|
|
712
|
-
interface Commands<ReturnType> {
|
|
713
|
-
imageUpload: {
|
|
714
|
-
/**
|
|
715
|
-
* Add an image
|
|
716
|
-
*/
|
|
717
|
-
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
718
|
-
/**
|
|
719
|
-
* Update an image
|
|
720
|
-
*/
|
|
721
|
-
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
722
|
-
/**
|
|
723
|
-
* Set image alignment
|
|
724
|
-
*/
|
|
725
|
-
setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
726
|
-
};
|
|
727
|
-
}
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
|
|
731
701
|
declare module '@tiptap/core' {
|
|
732
702
|
interface Commands<ReturnType> {
|
|
733
703
|
indent: {
|
|
@@ -746,11 +716,9 @@ declare module '@tiptap/core' {
|
|
|
746
716
|
|
|
747
717
|
declare module '@tiptap/core' {
|
|
748
718
|
interface Commands<ReturnType> {
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
emoji: string;
|
|
753
|
-
}) => ReturnType;
|
|
719
|
+
lineHeight: {
|
|
720
|
+
setLineHeight: (lineHeight: string) => ReturnType;
|
|
721
|
+
unsetLineHeight: () => ReturnType;
|
|
754
722
|
};
|
|
755
723
|
}
|
|
756
724
|
}
|
|
@@ -770,6 +738,16 @@ declare module '@tiptap/core' {
|
|
|
770
738
|
}
|
|
771
739
|
|
|
772
740
|
|
|
741
|
+
declare module '@tiptap/core' {
|
|
742
|
+
interface Commands<ReturnType> {
|
|
743
|
+
tableCellBackground: {
|
|
744
|
+
setTableCellBackground: (color: string) => ReturnType;
|
|
745
|
+
unsetTableCellBackground: () => ReturnType;
|
|
746
|
+
};
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
|
|
773
751
|
declare module '@tiptap/core' {
|
|
774
752
|
interface Commands<ReturnType> {
|
|
775
753
|
iframe: {
|
|
@@ -785,6 +763,26 @@ declare module '@tiptap/core' {
|
|
|
785
763
|
}
|
|
786
764
|
|
|
787
765
|
|
|
766
|
+
declare module '@tiptap/core' {
|
|
767
|
+
interface Commands<ReturnType> {
|
|
768
|
+
imageUpload: {
|
|
769
|
+
/**
|
|
770
|
+
* Add an image
|
|
771
|
+
*/
|
|
772
|
+
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
773
|
+
/**
|
|
774
|
+
* Update an image
|
|
775
|
+
*/
|
|
776
|
+
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
777
|
+
/**
|
|
778
|
+
* Set image alignment
|
|
779
|
+
*/
|
|
780
|
+
setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
781
|
+
};
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
|
|
788
786
|
declare module '@tiptap/core' {
|
|
789
787
|
interface Commands<ReturnType> {
|
|
790
788
|
painter: {
|
|
@@ -820,9 +818,8 @@ declare module '@tiptap/core' {
|
|
|
820
818
|
|
|
821
819
|
declare module '@tiptap/core' {
|
|
822
820
|
interface Commands<ReturnType> {
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
unsetTableCellBackground: () => ReturnType;
|
|
821
|
+
exportWord: {
|
|
822
|
+
exportToWord: () => ReturnType;
|
|
826
823
|
};
|
|
827
824
|
}
|
|
828
825
|
}
|
|
@@ -830,8 +827,9 @@ declare module '@tiptap/core' {
|
|
|
830
827
|
|
|
831
828
|
declare module '@tiptap/core' {
|
|
832
829
|
interface Commands<ReturnType> {
|
|
833
|
-
|
|
834
|
-
|
|
830
|
+
tableOfContents: {
|
|
831
|
+
setTableOfContents: () => ReturnType;
|
|
832
|
+
removeTableOfContents: () => ReturnType;
|
|
835
833
|
};
|
|
836
834
|
}
|
|
837
835
|
}
|
|
@@ -839,8 +837,11 @@ declare module '@tiptap/core' {
|
|
|
839
837
|
|
|
840
838
|
declare module '@tiptap/core' {
|
|
841
839
|
interface Commands<ReturnType> {
|
|
842
|
-
|
|
843
|
-
|
|
840
|
+
emoji: {
|
|
841
|
+
setEmoji: (emoji: {
|
|
842
|
+
name: string;
|
|
843
|
+
emoji: string;
|
|
844
|
+
}) => ReturnType;
|
|
844
845
|
};
|
|
845
846
|
}
|
|
846
847
|
}
|
|
@@ -848,9 +849,23 @@ declare module '@tiptap/core' {
|
|
|
848
849
|
|
|
849
850
|
declare module '@tiptap/core' {
|
|
850
851
|
interface Commands<ReturnType> {
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
852
|
+
twitter: {
|
|
853
|
+
/**
|
|
854
|
+
* Insert a tweet
|
|
855
|
+
* @param options The tweet attributes
|
|
856
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
857
|
+
*/
|
|
858
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
859
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
860
|
+
};
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
|
|
865
|
+
declare module '@tiptap/core' {
|
|
866
|
+
interface Commands<ReturnType> {
|
|
867
|
+
attachment: {
|
|
868
|
+
setAttachment: (attrs?: unknown) => ReturnType;
|
|
854
869
|
};
|
|
855
870
|
}
|
|
856
871
|
}
|
|
@@ -888,18 +903,8 @@ declare module '@tiptap/core' {
|
|
|
888
903
|
|
|
889
904
|
declare module '@tiptap/core' {
|
|
890
905
|
interface Commands<ReturnType> {
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
894
|
-
};
|
|
895
|
-
}
|
|
896
|
-
}
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
declare module '@tiptap/core' {
|
|
900
|
-
interface Commands<ReturnType> {
|
|
901
|
-
attachment: {
|
|
902
|
-
setAttachment: (attrs?: unknown) => ReturnType;
|
|
906
|
+
excalidraw: {
|
|
907
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
903
908
|
};
|
|
904
909
|
}
|
|
905
910
|
}
|
|
@@ -907,14 +912,9 @@ declare module '@tiptap/core' {
|
|
|
907
912
|
|
|
908
913
|
declare module '@tiptap/core' {
|
|
909
914
|
interface Commands<ReturnType> {
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
* @param options The tweet attributes
|
|
914
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
915
|
-
*/
|
|
916
|
-
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
917
|
-
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
915
|
+
mermaid: {
|
|
916
|
+
setMermaid: (options: any, replace?: any) => ReturnType;
|
|
917
|
+
setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
918
918
|
};
|
|
919
919
|
}
|
|
920
920
|
}
|
|
@@ -698,36 +698,6 @@ declare module '@tiptap/core' {
|
|
|
698
698
|
}
|
|
699
699
|
|
|
700
700
|
|
|
701
|
-
declare module '@tiptap/core' {
|
|
702
|
-
interface Commands<ReturnType> {
|
|
703
|
-
lineHeight: {
|
|
704
|
-
setLineHeight: (lineHeight: string) => ReturnType;
|
|
705
|
-
unsetLineHeight: () => ReturnType;
|
|
706
|
-
};
|
|
707
|
-
}
|
|
708
|
-
}
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
declare module '@tiptap/core' {
|
|
712
|
-
interface Commands<ReturnType> {
|
|
713
|
-
imageUpload: {
|
|
714
|
-
/**
|
|
715
|
-
* Add an image
|
|
716
|
-
*/
|
|
717
|
-
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
718
|
-
/**
|
|
719
|
-
* Update an image
|
|
720
|
-
*/
|
|
721
|
-
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
722
|
-
/**
|
|
723
|
-
* Set image alignment
|
|
724
|
-
*/
|
|
725
|
-
setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
726
|
-
};
|
|
727
|
-
}
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
|
|
731
701
|
declare module '@tiptap/core' {
|
|
732
702
|
interface Commands<ReturnType> {
|
|
733
703
|
indent: {
|
|
@@ -746,11 +716,9 @@ declare module '@tiptap/core' {
|
|
|
746
716
|
|
|
747
717
|
declare module '@tiptap/core' {
|
|
748
718
|
interface Commands<ReturnType> {
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
emoji: string;
|
|
753
|
-
}) => ReturnType;
|
|
719
|
+
lineHeight: {
|
|
720
|
+
setLineHeight: (lineHeight: string) => ReturnType;
|
|
721
|
+
unsetLineHeight: () => ReturnType;
|
|
754
722
|
};
|
|
755
723
|
}
|
|
756
724
|
}
|
|
@@ -770,6 +738,16 @@ declare module '@tiptap/core' {
|
|
|
770
738
|
}
|
|
771
739
|
|
|
772
740
|
|
|
741
|
+
declare module '@tiptap/core' {
|
|
742
|
+
interface Commands<ReturnType> {
|
|
743
|
+
tableCellBackground: {
|
|
744
|
+
setTableCellBackground: (color: string) => ReturnType;
|
|
745
|
+
unsetTableCellBackground: () => ReturnType;
|
|
746
|
+
};
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
|
|
773
751
|
declare module '@tiptap/core' {
|
|
774
752
|
interface Commands<ReturnType> {
|
|
775
753
|
iframe: {
|
|
@@ -785,6 +763,26 @@ declare module '@tiptap/core' {
|
|
|
785
763
|
}
|
|
786
764
|
|
|
787
765
|
|
|
766
|
+
declare module '@tiptap/core' {
|
|
767
|
+
interface Commands<ReturnType> {
|
|
768
|
+
imageUpload: {
|
|
769
|
+
/**
|
|
770
|
+
* Add an image
|
|
771
|
+
*/
|
|
772
|
+
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
773
|
+
/**
|
|
774
|
+
* Update an image
|
|
775
|
+
*/
|
|
776
|
+
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
777
|
+
/**
|
|
778
|
+
* Set image alignment
|
|
779
|
+
*/
|
|
780
|
+
setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
781
|
+
};
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
|
|
788
786
|
declare module '@tiptap/core' {
|
|
789
787
|
interface Commands<ReturnType> {
|
|
790
788
|
painter: {
|
|
@@ -820,9 +818,8 @@ declare module '@tiptap/core' {
|
|
|
820
818
|
|
|
821
819
|
declare module '@tiptap/core' {
|
|
822
820
|
interface Commands<ReturnType> {
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
unsetTableCellBackground: () => ReturnType;
|
|
821
|
+
exportWord: {
|
|
822
|
+
exportToWord: () => ReturnType;
|
|
826
823
|
};
|
|
827
824
|
}
|
|
828
825
|
}
|
|
@@ -830,8 +827,9 @@ declare module '@tiptap/core' {
|
|
|
830
827
|
|
|
831
828
|
declare module '@tiptap/core' {
|
|
832
829
|
interface Commands<ReturnType> {
|
|
833
|
-
|
|
834
|
-
|
|
830
|
+
tableOfContents: {
|
|
831
|
+
setTableOfContents: () => ReturnType;
|
|
832
|
+
removeTableOfContents: () => ReturnType;
|
|
835
833
|
};
|
|
836
834
|
}
|
|
837
835
|
}
|
|
@@ -839,8 +837,11 @@ declare module '@tiptap/core' {
|
|
|
839
837
|
|
|
840
838
|
declare module '@tiptap/core' {
|
|
841
839
|
interface Commands<ReturnType> {
|
|
842
|
-
|
|
843
|
-
|
|
840
|
+
emoji: {
|
|
841
|
+
setEmoji: (emoji: {
|
|
842
|
+
name: string;
|
|
843
|
+
emoji: string;
|
|
844
|
+
}) => ReturnType;
|
|
844
845
|
};
|
|
845
846
|
}
|
|
846
847
|
}
|
|
@@ -848,9 +849,23 @@ declare module '@tiptap/core' {
|
|
|
848
849
|
|
|
849
850
|
declare module '@tiptap/core' {
|
|
850
851
|
interface Commands<ReturnType> {
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
852
|
+
twitter: {
|
|
853
|
+
/**
|
|
854
|
+
* Insert a tweet
|
|
855
|
+
* @param options The tweet attributes
|
|
856
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
857
|
+
*/
|
|
858
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
859
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
860
|
+
};
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
|
|
865
|
+
declare module '@tiptap/core' {
|
|
866
|
+
interface Commands<ReturnType> {
|
|
867
|
+
attachment: {
|
|
868
|
+
setAttachment: (attrs?: unknown) => ReturnType;
|
|
854
869
|
};
|
|
855
870
|
}
|
|
856
871
|
}
|
|
@@ -888,18 +903,8 @@ declare module '@tiptap/core' {
|
|
|
888
903
|
|
|
889
904
|
declare module '@tiptap/core' {
|
|
890
905
|
interface Commands<ReturnType> {
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
894
|
-
};
|
|
895
|
-
}
|
|
896
|
-
}
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
declare module '@tiptap/core' {
|
|
900
|
-
interface Commands<ReturnType> {
|
|
901
|
-
attachment: {
|
|
902
|
-
setAttachment: (attrs?: unknown) => ReturnType;
|
|
906
|
+
excalidraw: {
|
|
907
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
903
908
|
};
|
|
904
909
|
}
|
|
905
910
|
}
|
|
@@ -907,14 +912,9 @@ declare module '@tiptap/core' {
|
|
|
907
912
|
|
|
908
913
|
declare module '@tiptap/core' {
|
|
909
914
|
interface Commands<ReturnType> {
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
* @param options The tweet attributes
|
|
914
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
915
|
-
*/
|
|
916
|
-
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
917
|
-
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
915
|
+
mermaid: {
|
|
916
|
+
setMermaid: (options: any, replace?: any) => ReturnType;
|
|
917
|
+
setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
918
918
|
};
|
|
919
919
|
}
|
|
920
920
|
}
|
package/lib/extension-bundle.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a as nn, I as an, U as on, S as rn, C as sn, f as Ce, N as he, b as cn, c as ln, R as je, F as dn, H as un, T as hn, E as H, d as mn, e as fn, g as gn, h as Ae, O as _n, i as bn, j as xn, k as pn, L as wn, l as yn, m as Le, n as vn, o as kn, D as Cn, P as Nn, p as Tn, q as An, G as Ln, r as Sn, s as Mn, t as In, u as En, v as Hn, w as zn, x as Mt, y as It, z as Et, A as Ze, J as Rn, K as Pn, M as Dn, Q as On, V as jn, W as Bn } from "./tiptap-
|
|
1
|
+
import { a as nn, I as an, U as on, S as rn, C as sn, f as Ce, N as he, b as cn, c as ln, R as je, F as dn, H as un, T as hn, E as H, d as mn, e as fn, g as gn, h as Ae, O as _n, i as bn, j as xn, k as pn, L as wn, l as yn, m as Le, n as vn, o as kn, D as Cn, P as Nn, p as Tn, q as An, G as Ln, r as Sn, s as Mn, t as In, u as En, v as Hn, w as zn, x as Mt, y as It, z as Et, A as Ze, J as Rn, K as Pn, M as Dn, Q as On, V as jn, W as Bn } from "./tiptap-24JNJPT1.js";
|
|
2
2
|
import { P as J, b as Q, $ as me, a0 as ge, al as U, am as $n, T as Ht, A as Fn, an as zt, ak as Rt, ao as _t, ap as bt, aq as Un, a4 as Vn, ar as qn, as as Kn } from "./vendor-K5cb6hwc.js";
|
|
3
3
|
import { jsxs as g, jsx as r, Fragment as oe } from "react/jsx-runtime";
|
|
4
4
|
import * as V from "react";
|
|
5
5
|
import Pe, { useMemo as R, useState as k, useRef as X, useCallback as j, Fragment as Je, forwardRef as Qe, useImperativeHandle as et, useEffect as P } from "react";
|
|
6
6
|
import { ChevronDown as tt, Check as Pt, ChevronUp as Wn, Copy as Gn, CopyCheck as Xn, SearchIcon as Yn, LoaderIcon as Zn, LucideTableProperties as Jn, LucideSheet as Qn, LucideImage as ei, LucideFile as ti, LucideVideo as ni, LucideAudioLines as ii } from "lucide-react";
|
|
7
|
-
import { i as nt, T as Be, a as $e, B as O, b as Fe, g as it, A as y, D as re, c as se, d as ce, e as ai, f as E, u as at, h as oi, I as D, j as be, k as Dt, l as We, m as ri, n as ot, P as xe, o as pe, p as we, q as rt, C as si, H as ci, L as li, r as di, M as ui, s as hi, t as xt, v as Se, w as st, x as ct, y as lt, z as dt, E as mi, F as fi, G as gi, J as De, K as Oe, N as _i, S as bi, O as xi, Q as pi, U as Y, V as wi, W as yi, X as vi, Y as ki, Z as Ci, _ as Ot } from "./RichTextEditor-
|
|
8
|
-
import { a5 as Wr, a1 as Gr, $ as Xr, a2 as Yr, a0 as Zr, a3 as Jr, a4 as Qr } from "./RichTextEditor-
|
|
7
|
+
import { i as nt, T as Be, a as $e, B as O, b as Fe, g as it, A as y, D as re, c as se, d as ce, e as ai, f as E, u as at, h as oi, I as D, j as be, k as Dt, l as We, m as ri, n as ot, P as xe, o as pe, p as we, q as rt, C as si, H as ci, L as li, r as di, M as ui, s as hi, t as xt, v as Se, w as st, x as ct, y as lt, z as dt, E as mi, F as fi, G as gi, J as De, K as Oe, N as _i, S as bi, O as xi, Q as pi, U as Y, V as wi, W as yi, X as vi, Y as ki, Z as Ci, _ as Ot } from "./RichTextEditor-DqXFuGeI.js";
|
|
8
|
+
import { a5 as Wr, a1 as Gr, $ as Xr, a2 as Yr, a0 as Zr, a3 as Jr, a4 as Qr } from "./RichTextEditor-DqXFuGeI.js";
|
|
9
9
|
import { M as Ni, D as jt, u as B, f as Ti, g as Ai, h as pt, i as z, j as Bt, k as Li, I as wt, m as Si, n as yt, V as Mi, T as Me, o as Ie, p as Ee } from "./index-CGVy85-a.js";
|
|
10
10
|
import * as le from "@radix-ui/react-tabs";
|
|
11
11
|
import { bundledThemes as $t, bundledLanguages as Ft, createHighlighter as Ii } from "shiki";
|
|
@@ -2976,8 +2976,9 @@ const Oa = {
|
|
|
2976
2976
|
addProseMirrorPlugins() {
|
|
2977
2977
|
const t = Ra({
|
|
2978
2978
|
validateFn: (n) => !(!this.options.acceptMimes.includes(n.type) || n.size > this.options.maxSize),
|
|
2979
|
-
onUpload: this.options.upload
|
|
2979
|
+
onUpload: this.options.upload,
|
|
2980
2980
|
// postUpload: this.options.postUpload,
|
|
2981
|
+
defaultInline: this.options.defaultInline
|
|
2981
2982
|
});
|
|
2982
2983
|
return [
|
|
2983
2984
|
new J({
|
package/lib/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react"),d=require("./RichTextEditor-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react"),d=require("./RichTextEditor-DBjHuER_.cjs"),c=require("./tiptap-DaE4Kxno.cjs");function a(){var r;const e=t.useRef({editor:null}),[i,o]=t.useState(!1),[s,n]=t.useState(null);return t.useEffect(()=>{var u;(u=e.current)!=null&&u.editor&&(o(!0),n(e.current.editor))},[e,(r=e.current)==null?void 0:r.editor]),{isReady:i,editor:s,editorRef:e}}exports.default=d.RichTextEditor;exports.BubbleMenu=c.BubbleMenu;exports.useEditorState=a;
|
package/lib/index.d.cts
CHANGED
|
@@ -249,36 +249,6 @@ declare module '@tiptap/core' {
|
|
|
249
249
|
}
|
|
250
250
|
|
|
251
251
|
|
|
252
|
-
declare module '@tiptap/core' {
|
|
253
|
-
interface Commands<ReturnType> {
|
|
254
|
-
lineHeight: {
|
|
255
|
-
setLineHeight: (lineHeight: string) => ReturnType;
|
|
256
|
-
unsetLineHeight: () => ReturnType;
|
|
257
|
-
};
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
declare module '@tiptap/core' {
|
|
263
|
-
interface Commands<ReturnType> {
|
|
264
|
-
imageUpload: {
|
|
265
|
-
/**
|
|
266
|
-
* Add an image
|
|
267
|
-
*/
|
|
268
|
-
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
269
|
-
/**
|
|
270
|
-
* Update an image
|
|
271
|
-
*/
|
|
272
|
-
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
273
|
-
/**
|
|
274
|
-
* Set image alignment
|
|
275
|
-
*/
|
|
276
|
-
setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
277
|
-
};
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
|
|
282
252
|
declare module '@tiptap/core' {
|
|
283
253
|
interface Commands<ReturnType> {
|
|
284
254
|
indent: {
|
|
@@ -297,11 +267,9 @@ declare module '@tiptap/core' {
|
|
|
297
267
|
|
|
298
268
|
declare module '@tiptap/core' {
|
|
299
269
|
interface Commands<ReturnType> {
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
emoji: string;
|
|
304
|
-
}) => ReturnType;
|
|
270
|
+
lineHeight: {
|
|
271
|
+
setLineHeight: (lineHeight: string) => ReturnType;
|
|
272
|
+
unsetLineHeight: () => ReturnType;
|
|
305
273
|
};
|
|
306
274
|
}
|
|
307
275
|
}
|
|
@@ -321,6 +289,16 @@ declare module '@tiptap/core' {
|
|
|
321
289
|
}
|
|
322
290
|
|
|
323
291
|
|
|
292
|
+
declare module '@tiptap/core' {
|
|
293
|
+
interface Commands<ReturnType> {
|
|
294
|
+
tableCellBackground: {
|
|
295
|
+
setTableCellBackground: (color: string) => ReturnType;
|
|
296
|
+
unsetTableCellBackground: () => ReturnType;
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
|
|
324
302
|
declare module '@tiptap/core' {
|
|
325
303
|
interface Commands<ReturnType> {
|
|
326
304
|
iframe: {
|
|
@@ -336,6 +314,26 @@ declare module '@tiptap/core' {
|
|
|
336
314
|
}
|
|
337
315
|
|
|
338
316
|
|
|
317
|
+
declare module '@tiptap/core' {
|
|
318
|
+
interface Commands<ReturnType> {
|
|
319
|
+
imageUpload: {
|
|
320
|
+
/**
|
|
321
|
+
* Add an image
|
|
322
|
+
*/
|
|
323
|
+
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
324
|
+
/**
|
|
325
|
+
* Update an image
|
|
326
|
+
*/
|
|
327
|
+
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
328
|
+
/**
|
|
329
|
+
* Set image alignment
|
|
330
|
+
*/
|
|
331
|
+
setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
|
|
339
337
|
declare module '@tiptap/core' {
|
|
340
338
|
interface Commands<ReturnType> {
|
|
341
339
|
painter: {
|
|
@@ -371,9 +369,8 @@ declare module '@tiptap/core' {
|
|
|
371
369
|
|
|
372
370
|
declare module '@tiptap/core' {
|
|
373
371
|
interface Commands<ReturnType> {
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
unsetTableCellBackground: () => ReturnType;
|
|
372
|
+
exportWord: {
|
|
373
|
+
exportToWord: () => ReturnType;
|
|
377
374
|
};
|
|
378
375
|
}
|
|
379
376
|
}
|
|
@@ -381,8 +378,9 @@ declare module '@tiptap/core' {
|
|
|
381
378
|
|
|
382
379
|
declare module '@tiptap/core' {
|
|
383
380
|
interface Commands<ReturnType> {
|
|
384
|
-
|
|
385
|
-
|
|
381
|
+
tableOfContents: {
|
|
382
|
+
setTableOfContents: () => ReturnType;
|
|
383
|
+
removeTableOfContents: () => ReturnType;
|
|
386
384
|
};
|
|
387
385
|
}
|
|
388
386
|
}
|
|
@@ -390,8 +388,11 @@ declare module '@tiptap/core' {
|
|
|
390
388
|
|
|
391
389
|
declare module '@tiptap/core' {
|
|
392
390
|
interface Commands<ReturnType> {
|
|
393
|
-
|
|
394
|
-
|
|
391
|
+
emoji: {
|
|
392
|
+
setEmoji: (emoji: {
|
|
393
|
+
name: string;
|
|
394
|
+
emoji: string;
|
|
395
|
+
}) => ReturnType;
|
|
395
396
|
};
|
|
396
397
|
}
|
|
397
398
|
}
|
|
@@ -399,9 +400,23 @@ declare module '@tiptap/core' {
|
|
|
399
400
|
|
|
400
401
|
declare module '@tiptap/core' {
|
|
401
402
|
interface Commands<ReturnType> {
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
403
|
+
twitter: {
|
|
404
|
+
/**
|
|
405
|
+
* Insert a tweet
|
|
406
|
+
* @param options The tweet attributes
|
|
407
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
408
|
+
*/
|
|
409
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
410
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
declare module '@tiptap/core' {
|
|
417
|
+
interface Commands<ReturnType> {
|
|
418
|
+
attachment: {
|
|
419
|
+
setAttachment: (attrs?: unknown) => ReturnType;
|
|
405
420
|
};
|
|
406
421
|
}
|
|
407
422
|
}
|
|
@@ -439,18 +454,8 @@ declare module '@tiptap/core' {
|
|
|
439
454
|
|
|
440
455
|
declare module '@tiptap/core' {
|
|
441
456
|
interface Commands<ReturnType> {
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
445
|
-
};
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
declare module '@tiptap/core' {
|
|
451
|
-
interface Commands<ReturnType> {
|
|
452
|
-
attachment: {
|
|
453
|
-
setAttachment: (attrs?: unknown) => ReturnType;
|
|
457
|
+
excalidraw: {
|
|
458
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
454
459
|
};
|
|
455
460
|
}
|
|
456
461
|
}
|
|
@@ -458,14 +463,9 @@ declare module '@tiptap/core' {
|
|
|
458
463
|
|
|
459
464
|
declare module '@tiptap/core' {
|
|
460
465
|
interface Commands<ReturnType> {
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
* @param options The tweet attributes
|
|
465
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
466
|
-
*/
|
|
467
|
-
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
468
|
-
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
466
|
+
mermaid: {
|
|
467
|
+
setMermaid: (options: any, replace?: any) => ReturnType;
|
|
468
|
+
setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
469
469
|
};
|
|
470
470
|
}
|
|
471
471
|
}
|