rte-builder 2.0.2 → 2.0.4
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/dist/index.css +27 -0
- package/dist/index.css.map +1 -1
- package/dist/index.js +897 -365
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +955 -389
- package/dist/index.mjs.map +1 -1
- package/package.json +11 -20
package/dist/index.mjs
CHANGED
|
@@ -1713,7 +1713,7 @@ var init_TipTapToolbar = __esm({
|
|
|
1713
1713
|
onClick: () => editor.chain().focus().toggleBold().run(),
|
|
1714
1714
|
active: editor.isActive("bold"),
|
|
1715
1715
|
title: "Bold (Ctrl+B)",
|
|
1716
|
-
children: /* @__PURE__ */ jsx("
|
|
1716
|
+
children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42zM10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3v-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5z" }) })
|
|
1717
1717
|
},
|
|
1718
1718
|
"bold"
|
|
1719
1719
|
);
|
|
@@ -1724,7 +1724,7 @@ var init_TipTapToolbar = __esm({
|
|
|
1724
1724
|
onClick: () => editor.chain().focus().toggleItalic().run(),
|
|
1725
1725
|
active: editor.isActive("italic"),
|
|
1726
1726
|
title: "Italic (Ctrl+I)",
|
|
1727
|
-
children: /* @__PURE__ */ jsx("
|
|
1727
|
+
children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z" }) })
|
|
1728
1728
|
},
|
|
1729
1729
|
"italic"
|
|
1730
1730
|
);
|
|
@@ -1735,7 +1735,7 @@ var init_TipTapToolbar = __esm({
|
|
|
1735
1735
|
onClick: () => editor.chain().focus().toggleUnderline().run(),
|
|
1736
1736
|
active: editor.isActive("underline"),
|
|
1737
1737
|
title: "Underline (Ctrl+U)",
|
|
1738
|
-
children: /* @__PURE__ */ jsx("
|
|
1738
|
+
children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6zm-7 2v2h14v-2H5z" }) })
|
|
1739
1739
|
},
|
|
1740
1740
|
"underline"
|
|
1741
1741
|
);
|
|
@@ -1746,7 +1746,7 @@ var init_TipTapToolbar = __esm({
|
|
|
1746
1746
|
onClick: () => editor.chain().focus().toggleStrike().run(),
|
|
1747
1747
|
active: editor.isActive("strike"),
|
|
1748
1748
|
title: "Strikethrough",
|
|
1749
|
-
children: /* @__PURE__ */ jsx("
|
|
1749
|
+
children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M10 19h4v-3h-4v3zM5 4v3h5v3h4V7h5V4H5zM3 14h18v-2H3v2z" }) })
|
|
1750
1750
|
},
|
|
1751
1751
|
"strike"
|
|
1752
1752
|
);
|
|
@@ -1757,7 +1757,23 @@ var init_TipTapToolbar = __esm({
|
|
|
1757
1757
|
onClick: () => editor.chain().focus().toggleCode().run(),
|
|
1758
1758
|
active: editor.isActive("code"),
|
|
1759
1759
|
title: "Inline Code",
|
|
1760
|
-
children:
|
|
1760
|
+
children: /* @__PURE__ */ jsxs(
|
|
1761
|
+
"svg",
|
|
1762
|
+
{
|
|
1763
|
+
width: "18",
|
|
1764
|
+
height: "18",
|
|
1765
|
+
viewBox: "0 0 24 24",
|
|
1766
|
+
fill: "none",
|
|
1767
|
+
stroke: "currentColor",
|
|
1768
|
+
strokeWidth: "2",
|
|
1769
|
+
strokeLinecap: "round",
|
|
1770
|
+
strokeLinejoin: "round",
|
|
1771
|
+
children: [
|
|
1772
|
+
/* @__PURE__ */ jsx("polyline", { points: "16 18 22 12 16 6" }),
|
|
1773
|
+
/* @__PURE__ */ jsx("polyline", { points: "8 6 2 12 8 18" })
|
|
1774
|
+
]
|
|
1775
|
+
}
|
|
1776
|
+
)
|
|
1761
1777
|
},
|
|
1762
1778
|
"code"
|
|
1763
1779
|
);
|
|
@@ -1768,35 +1784,46 @@ var init_TipTapToolbar = __esm({
|
|
|
1768
1784
|
onClick: () => editor.chain().focus().toggleCodeBlock().run(),
|
|
1769
1785
|
active: editor.isActive("codeBlock"),
|
|
1770
1786
|
title: "Code Block",
|
|
1771
|
-
children:
|
|
1787
|
+
children: /* @__PURE__ */ jsxs(
|
|
1788
|
+
"svg",
|
|
1789
|
+
{
|
|
1790
|
+
width: "18",
|
|
1791
|
+
height: "18",
|
|
1792
|
+
viewBox: "0 0 24 24",
|
|
1793
|
+
fill: "none",
|
|
1794
|
+
stroke: "currentColor",
|
|
1795
|
+
strokeWidth: "2",
|
|
1796
|
+
strokeLinecap: "round",
|
|
1797
|
+
strokeLinejoin: "round",
|
|
1798
|
+
children: [
|
|
1799
|
+
/* @__PURE__ */ jsx("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }),
|
|
1800
|
+
/* @__PURE__ */ jsx("polyline", { points: "9 8 5 12 9 16" }),
|
|
1801
|
+
/* @__PURE__ */ jsx("polyline", { points: "15 8 19 12 15 16" })
|
|
1802
|
+
]
|
|
1803
|
+
}
|
|
1804
|
+
)
|
|
1772
1805
|
},
|
|
1773
1806
|
"codeBlock"
|
|
1774
1807
|
);
|
|
1775
1808
|
case "subscript":
|
|
1776
|
-
return /* @__PURE__ */
|
|
1809
|
+
return /* @__PURE__ */ jsx(
|
|
1777
1810
|
ToolbarButton3,
|
|
1778
1811
|
{
|
|
1779
1812
|
onClick: () => editor.chain().focus().toggleSubscript().run(),
|
|
1780
1813
|
active: editor.isActive("subscript"),
|
|
1781
1814
|
title: "Subscript",
|
|
1782
|
-
children:
|
|
1783
|
-
"X",
|
|
1784
|
-
/* @__PURE__ */ jsx("sub", { children: "2" })
|
|
1785
|
-
]
|
|
1815
|
+
children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M22 18h-2v1h3v1h-4v-2.5a.5.5 0 01.5-.5h2a.5.5 0 00.5-.5v-.5H18v-1h4v2.5a.5.5 0 01-.5.5h-2a.5.5 0 00-.5.5v.5zM5.88 5h2.66l3.4 5.42h.12L15.5 5h2.62l-4.87 7.38L18.22 20h-2.66l-3.62-5.63h-.12l-3.62 5.63H5.56l4.92-7.62L5.88 5z" }) })
|
|
1786
1816
|
},
|
|
1787
1817
|
"subscript"
|
|
1788
1818
|
);
|
|
1789
1819
|
case "superscript":
|
|
1790
|
-
return /* @__PURE__ */
|
|
1820
|
+
return /* @__PURE__ */ jsx(
|
|
1791
1821
|
ToolbarButton3,
|
|
1792
1822
|
{
|
|
1793
1823
|
onClick: () => editor.chain().focus().toggleSuperscript().run(),
|
|
1794
1824
|
active: editor.isActive("superscript"),
|
|
1795
1825
|
title: "Superscript",
|
|
1796
|
-
children:
|
|
1797
|
-
"X",
|
|
1798
|
-
/* @__PURE__ */ jsx("sup", { children: "2" })
|
|
1799
|
-
]
|
|
1826
|
+
children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M22 7h-2v1h3v1h-4V6.5a.5.5 0 01.5-.5h2a.5.5 0 00.5-.5v-.5H18V4h4v2.5a.5.5 0 01-.5.5h-2a.5.5 0 00-.5.5v.5zM5.88 5h2.66l3.4 5.42h.12L15.5 5h2.62l-4.87 7.38L18.22 20h-2.66l-3.62-5.63h-.12l-3.62 5.63H5.56l4.92-7.62L5.88 5z" }) })
|
|
1800
1827
|
},
|
|
1801
1828
|
"superscript"
|
|
1802
1829
|
);
|
|
@@ -1806,7 +1833,7 @@ var init_TipTapToolbar = __esm({
|
|
|
1806
1833
|
{
|
|
1807
1834
|
onClick: () => editor.chain().focus().clearNodes().unsetAllMarks().run(),
|
|
1808
1835
|
title: "Clear Formatting",
|
|
1809
|
-
children: "
|
|
1836
|
+
children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M3.27 5L2 6.27l6.97 6.97L6.5 19h3l1.57-3.66L16.73 21 18 19.73 3.55 5.27 3.27 5zM6 5v.18L8.82 8h2.4l-.72 1.68 2.1 2.1L14.21 8H20V5H6z" }) })
|
|
1810
1837
|
},
|
|
1811
1838
|
"clearFormatting"
|
|
1812
1839
|
);
|
|
@@ -1872,29 +1899,85 @@ var init_TipTapToolbar = __esm({
|
|
|
1872
1899
|
"lineHeight"
|
|
1873
1900
|
);
|
|
1874
1901
|
case "textColor":
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
/* @__PURE__ */ jsx(
|
|
1878
|
-
"
|
|
1902
|
+
const textPresetColors = ["#11a161", "#85144b", "#ff851b", "#b10dc9"];
|
|
1903
|
+
return /* @__PURE__ */ jsxs("span", { className: "rte-builder-toolbar-color-group", children: [
|
|
1904
|
+
textPresetColors.map((color) => /* @__PURE__ */ jsx(
|
|
1905
|
+
"button",
|
|
1879
1906
|
{
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1907
|
+
className: "rte-builder-color-preset",
|
|
1908
|
+
style: { backgroundColor: color },
|
|
1909
|
+
onClick: () => editor.chain().focus().setColor(color).run(),
|
|
1910
|
+
title: `Text Color: ${color}`,
|
|
1911
|
+
type: "button"
|
|
1912
|
+
},
|
|
1913
|
+
`text-${color}`
|
|
1914
|
+
)),
|
|
1915
|
+
/* @__PURE__ */ jsx("span", { className: "rte-builder-toolbar-color", children: /* @__PURE__ */ jsxs("label", { title: "Custom Text Color", children: [
|
|
1916
|
+
/* @__PURE__ */ jsx(
|
|
1917
|
+
"svg",
|
|
1918
|
+
{
|
|
1919
|
+
width: "14",
|
|
1920
|
+
height: "14",
|
|
1921
|
+
viewBox: "0 0 24 24",
|
|
1922
|
+
fill: "currentColor",
|
|
1923
|
+
children: /* @__PURE__ */ jsx("path", { d: "M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8zm-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12zm3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8zm5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8zm3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z" })
|
|
1924
|
+
}
|
|
1925
|
+
),
|
|
1926
|
+
/* @__PURE__ */ jsx(
|
|
1927
|
+
"input",
|
|
1928
|
+
{
|
|
1929
|
+
type: "color",
|
|
1930
|
+
onChange: (e) => editor.chain().focus().setColor(e.target.value).run(),
|
|
1931
|
+
value: editor.getAttributes("textStyle").color || "#000000"
|
|
1932
|
+
}
|
|
1933
|
+
)
|
|
1934
|
+
] }) })
|
|
1935
|
+
] }, "textColor");
|
|
1886
1936
|
case "backgroundColor":
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1937
|
+
const bgPresetColors = ["#11a161", "#85144b", "#ff851b", "#b10dc9"];
|
|
1938
|
+
return /* @__PURE__ */ jsxs(
|
|
1939
|
+
"span",
|
|
1940
|
+
{
|
|
1941
|
+
className: "rte-builder-toolbar-color-group",
|
|
1942
|
+
children: [
|
|
1943
|
+
bgPresetColors.map((color) => /* @__PURE__ */ jsx(
|
|
1944
|
+
"button",
|
|
1945
|
+
{
|
|
1946
|
+
className: "rte-builder-color-preset rte-builder-color-preset-bg",
|
|
1947
|
+
style: { backgroundColor: color },
|
|
1948
|
+
onClick: () => editor.chain().focus().toggleHighlight({ color }).run(),
|
|
1949
|
+
title: `Highlight Color: ${color}`,
|
|
1950
|
+
type: "button"
|
|
1951
|
+
},
|
|
1952
|
+
`bg-${color}`
|
|
1953
|
+
)),
|
|
1954
|
+
/* @__PURE__ */ jsx("span", { className: "rte-builder-toolbar-color", children: /* @__PURE__ */ jsxs("label", { title: "Custom Background Color", children: [
|
|
1955
|
+
/* @__PURE__ */ jsxs(
|
|
1956
|
+
"svg",
|
|
1957
|
+
{
|
|
1958
|
+
width: "14",
|
|
1959
|
+
height: "14",
|
|
1960
|
+
viewBox: "0 0 24 24",
|
|
1961
|
+
fill: "currentColor",
|
|
1962
|
+
children: [
|
|
1963
|
+
/* @__PURE__ */ jsx("path", { d: "M16.56 8.94L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.59-.59 1.54 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.58.59-1.53 0-2.12zM5.21 10L10 5.21 14.79 10H5.21zM19 11.5s-2 2.17-2 3.5c0 1.1.9 2 2 2s2-.9 2-2c0-1.33-2-3.5-2-3.5z" }),
|
|
1964
|
+
/* @__PURE__ */ jsx("path", { d: "M2 20h20v4H2z", fillOpacity: ".36" })
|
|
1965
|
+
]
|
|
1966
|
+
}
|
|
1967
|
+
),
|
|
1968
|
+
/* @__PURE__ */ jsx(
|
|
1969
|
+
"input",
|
|
1970
|
+
{
|
|
1971
|
+
type: "color",
|
|
1972
|
+
onChange: (e) => editor.chain().focus().toggleHighlight({ color: e.target.value }).run(),
|
|
1973
|
+
value: editor.getAttributes("highlight").color || "#ffff00"
|
|
1974
|
+
}
|
|
1975
|
+
)
|
|
1976
|
+
] }) })
|
|
1977
|
+
]
|
|
1978
|
+
},
|
|
1979
|
+
"backgroundColor"
|
|
1980
|
+
);
|
|
1898
1981
|
case "alignLeft":
|
|
1899
1982
|
return /* @__PURE__ */ jsx(
|
|
1900
1983
|
ToolbarButton3,
|
|
@@ -1902,7 +1985,7 @@ var init_TipTapToolbar = __esm({
|
|
|
1902
1985
|
onClick: () => editor.chain().focus().setTextAlign("left").run(),
|
|
1903
1986
|
active: editor.isActive({ textAlign: "left" }),
|
|
1904
1987
|
title: "Align Left",
|
|
1905
|
-
children: "
|
|
1988
|
+
children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M15 15H3v2h12v-2zm0-8H3v2h12V7zM3 13h18v-2H3v2zm0 8h18v-2H3v2zM3 3v2h18V3H3z" }) })
|
|
1906
1989
|
},
|
|
1907
1990
|
"alignLeft"
|
|
1908
1991
|
);
|
|
@@ -1913,7 +1996,7 @@ var init_TipTapToolbar = __esm({
|
|
|
1913
1996
|
onClick: () => editor.chain().focus().setTextAlign("center").run(),
|
|
1914
1997
|
active: editor.isActive({ textAlign: "center" }),
|
|
1915
1998
|
title: "Align Center",
|
|
1916
|
-
children: "
|
|
1999
|
+
children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M7 15v2h10v-2H7zm-4 6h18v-2H3v2zm0-8h18v-2H3v2zm4-6v2h10V7H7zM3 3v2h18V3H3z" }) })
|
|
1917
2000
|
},
|
|
1918
2001
|
"alignCenter"
|
|
1919
2002
|
);
|
|
@@ -1924,7 +2007,7 @@ var init_TipTapToolbar = __esm({
|
|
|
1924
2007
|
onClick: () => editor.chain().focus().setTextAlign("right").run(),
|
|
1925
2008
|
active: editor.isActive({ textAlign: "right" }),
|
|
1926
2009
|
title: "Align Right",
|
|
1927
|
-
children: "
|
|
2010
|
+
children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M3 21h18v-2H3v2zm6-4h12v-2H9v2zm-6-4h18v-2H3v2zm6-4h12V7H9v2zM3 3v2h18V3H3z" }) })
|
|
1928
2011
|
},
|
|
1929
2012
|
"alignRight"
|
|
1930
2013
|
);
|
|
@@ -1935,7 +2018,7 @@ var init_TipTapToolbar = __esm({
|
|
|
1935
2018
|
onClick: () => editor.chain().focus().setTextAlign("justify").run(),
|
|
1936
2019
|
active: editor.isActive({ textAlign: "justify" }),
|
|
1937
2020
|
title: "Justify",
|
|
1938
|
-
children: "
|
|
2021
|
+
children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M3 21h18v-2H3v2zm0-4h18v-2H3v2zm0-4h18v-2H3v2zm0-4h18V7H3v2zM3 3v2h18V3H3z" }) })
|
|
1939
2022
|
},
|
|
1940
2023
|
"alignJustify"
|
|
1941
2024
|
);
|
|
@@ -1945,7 +2028,7 @@ var init_TipTapToolbar = __esm({
|
|
|
1945
2028
|
{
|
|
1946
2029
|
onClick: () => editor.chain().focus().indent().run(),
|
|
1947
2030
|
title: "Indent (Tab)",
|
|
1948
|
-
children: "
|
|
2031
|
+
children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M3 21h18v-2H3v2zM3 8v8l4-4-4-4zm8 9h10v-2H11v2zM3 3v2h18V3H3zm8 6h10V7H11v2zm0 4h10v-2H11v2z" }) })
|
|
1949
2032
|
},
|
|
1950
2033
|
"indent"
|
|
1951
2034
|
);
|
|
@@ -1955,7 +2038,7 @@ var init_TipTapToolbar = __esm({
|
|
|
1955
2038
|
{
|
|
1956
2039
|
onClick: () => editor.chain().focus().outdent().run(),
|
|
1957
2040
|
title: "Outdent (Shift+Tab)",
|
|
1958
|
-
children: "
|
|
2041
|
+
children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M11 17h10v-2H11v2zm-8-5l4 4V8l-4 4zm0 9h18v-2H3v2zM3 3v2h18V3H3zm8 6h10V7H11v2zm0 4h10v-2H11v2z" }) })
|
|
1959
2042
|
},
|
|
1960
2043
|
"outdent"
|
|
1961
2044
|
);
|
|
@@ -1966,7 +2049,7 @@ var init_TipTapToolbar = __esm({
|
|
|
1966
2049
|
onClick: () => editor.chain().focus().toggleBulletList().run(),
|
|
1967
2050
|
active: editor.isActive("bulletList"),
|
|
1968
2051
|
title: "Bullet List",
|
|
1969
|
-
children: "
|
|
2052
|
+
children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5zm0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5zM7 19h14v-2H7v2zm0-6h14v-2H7v2zm0-8v2h14V5H7z" }) })
|
|
1970
2053
|
},
|
|
1971
2054
|
"bulletList"
|
|
1972
2055
|
);
|
|
@@ -1977,7 +2060,7 @@ var init_TipTapToolbar = __esm({
|
|
|
1977
2060
|
onClick: () => editor.chain().focus().toggleOrderedList().run(),
|
|
1978
2061
|
active: editor.isActive("orderedList"),
|
|
1979
2062
|
title: "Numbered List",
|
|
1980
|
-
children: "1."
|
|
2063
|
+
children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M2 17h2v.5H3v1h1v.5H2v1h3v-4H2v1zm1-9h1V4H2v1h1v3zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2v1zm5-6v2h14V5H7zm0 14h14v-2H7v2zm0-6h14v-2H7v2z" }) })
|
|
1981
2064
|
},
|
|
1982
2065
|
"orderedList"
|
|
1983
2066
|
);
|
|
@@ -1988,16 +2071,21 @@ var init_TipTapToolbar = __esm({
|
|
|
1988
2071
|
case "heading5":
|
|
1989
2072
|
case "heading6":
|
|
1990
2073
|
const level = parseInt(button.replace("heading", ""));
|
|
1991
|
-
|
|
2074
|
+
const headingIcons = {
|
|
2075
|
+
1: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14h-2V9h-2V7h4v10z" }) }),
|
|
2076
|
+
2: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 8c0 1.1-.9 2-2 2h-2v2h4v2H9v-4c0-1.1.9-2 2-2h2V9H9V7h4c1.1 0 2 .9 2 2v2z" }) }),
|
|
2077
|
+
3: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 8c0 1.1-.9 2-2 2v0c1.1 0 2 .9 2 2v0c0 1.1-.9 2-2 2H9v-2h4v-2h-2v-2h2V9H9V7h4c1.1 0 2 .9 2 2v2z" }) }),
|
|
2078
|
+
4: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 14h-2v-4H9V7h2v4h2V7h2v10z" }) }),
|
|
2079
|
+
5: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 6h-4v2h2c1.1 0 2 .9 2 2v2c0 1.1-.9 2-2 2H9v-2h4v-2H9V7h6v2z" }) }),
|
|
2080
|
+
6: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 8c0 1.1-.9 2-2 2h-2v-2h2V9H9v6h4c1.1 0 2-.9 2-2v-2c0-1.1-.9-2-2-2h-2V7h2c1.1 0 2 .9 2 2v2z" }) })
|
|
2081
|
+
};
|
|
2082
|
+
return /* @__PURE__ */ jsx(
|
|
1992
2083
|
ToolbarButton3,
|
|
1993
2084
|
{
|
|
1994
2085
|
onClick: () => editor.chain().focus().toggleHeading({ level }).run(),
|
|
1995
2086
|
active: editor.isActive("heading", { level }),
|
|
1996
2087
|
title: `Heading ${level}`,
|
|
1997
|
-
children: [
|
|
1998
|
-
"H",
|
|
1999
|
-
level
|
|
2000
|
-
]
|
|
2088
|
+
children: headingIcons[level]
|
|
2001
2089
|
},
|
|
2002
2090
|
button
|
|
2003
2091
|
);
|
|
@@ -2008,7 +2096,7 @@ var init_TipTapToolbar = __esm({
|
|
|
2008
2096
|
onClick: () => editor.chain().focus().toggleBlockquote().run(),
|
|
2009
2097
|
active: editor.isActive("blockquote"),
|
|
2010
2098
|
title: "Blockquote",
|
|
2011
|
-
children:
|
|
2099
|
+
children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z" }) })
|
|
2012
2100
|
},
|
|
2013
2101
|
"blockquote"
|
|
2014
2102
|
);
|
|
@@ -2018,7 +2106,7 @@ var init_TipTapToolbar = __esm({
|
|
|
2018
2106
|
{
|
|
2019
2107
|
onClick: () => editor.chain().focus().setHorizontalRule().run(),
|
|
2020
2108
|
title: "Horizontal Rule",
|
|
2021
|
-
children: "
|
|
2109
|
+
children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M4 11h16v2H4z" }) })
|
|
2022
2110
|
},
|
|
2023
2111
|
"horizontalRule"
|
|
2024
2112
|
);
|
|
@@ -2034,7 +2122,7 @@ var init_TipTapToolbar = __esm({
|
|
|
2034
2122
|
},
|
|
2035
2123
|
active: editor.isActive("link"),
|
|
2036
2124
|
title: "Insert Link",
|
|
2037
|
-
children: "
|
|
2125
|
+
children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z" }) })
|
|
2038
2126
|
},
|
|
2039
2127
|
"link"
|
|
2040
2128
|
);
|
|
@@ -2045,7 +2133,7 @@ var init_TipTapToolbar = __esm({
|
|
|
2045
2133
|
onClick: () => editor.chain().focus().unsetLink().run(),
|
|
2046
2134
|
disabled: !editor.isActive("link"),
|
|
2047
2135
|
title: "Remove Link",
|
|
2048
|
-
children: "
|
|
2136
|
+
children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M17 7h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1 0 1.43-.98 2.63-2.31 2.98l1.46 1.46C20.88 15.61 22 13.95 22 12c0-2.76-2.24-5-5-5zm-1 4h-2.19l2 2H16v-2zM2 4.27l3.11 3.11C3.29 8.12 2 9.91 2 12c0 2.76 2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1 0-1.59 1.21-2.9 2.76-3.07L8.73 11H8v2h2.73L13 15.27V17h1.73l4.01 4L20 19.74 3.27 3 2 4.27z" }) })
|
|
2049
2137
|
},
|
|
2050
2138
|
"unlink"
|
|
2051
2139
|
);
|
|
@@ -2064,7 +2152,7 @@ var init_TipTapToolbar = __esm({
|
|
|
2064
2152
|
}
|
|
2065
2153
|
},
|
|
2066
2154
|
title: "Insert Image",
|
|
2067
|
-
children: "
|
|
2155
|
+
children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z" }) })
|
|
2068
2156
|
},
|
|
2069
2157
|
"image"
|
|
2070
2158
|
);
|
|
@@ -2083,7 +2171,7 @@ var init_TipTapToolbar = __esm({
|
|
|
2083
2171
|
}
|
|
2084
2172
|
},
|
|
2085
2173
|
title: "Insert Video",
|
|
2086
|
-
children: "
|
|
2174
|
+
children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l4 4v-11l-4 4z" }) })
|
|
2087
2175
|
},
|
|
2088
2176
|
"video"
|
|
2089
2177
|
);
|
|
@@ -2093,7 +2181,7 @@ var init_TipTapToolbar = __esm({
|
|
|
2093
2181
|
{
|
|
2094
2182
|
onClick: () => editor.chain().focus().insertTable({ rows: 3, cols: 3, withHeaderRow: true }).run(),
|
|
2095
2183
|
title: "Insert Table",
|
|
2096
|
-
children: "
|
|
2184
|
+
children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 2v4H5V5h14zm0 6v4h-6v-4h6zM5 15v-4h6v4H5zm0 2h6v2H5v-2zm8 2v-2h6v2h-6z" }) })
|
|
2097
2185
|
},
|
|
2098
2186
|
"table"
|
|
2099
2187
|
);
|
|
@@ -2106,7 +2194,16 @@ var init_TipTapToolbar = __esm({
|
|
|
2106
2194
|
onClick: () => setShowEmojiPicker(!showEmojiPicker),
|
|
2107
2195
|
active: showEmojiPicker,
|
|
2108
2196
|
title: "Insert Emoji",
|
|
2109
|
-
children:
|
|
2197
|
+
children: /* @__PURE__ */ jsx(
|
|
2198
|
+
"svg",
|
|
2199
|
+
{
|
|
2200
|
+
width: "16",
|
|
2201
|
+
height: "16",
|
|
2202
|
+
viewBox: "0 0 24 24",
|
|
2203
|
+
fill: "currentColor",
|
|
2204
|
+
children: /* @__PURE__ */ jsx("path", { d: "M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm3.5-9c.83 0 1.5-.67 1.5-1.5S16.33 8 15.5 8 14 8.67 14 9.5s.67 1.5 1.5 1.5zm-7 0c.83 0 1.5-.67 1.5-1.5S9.33 8 8.5 8 7 8.67 7 9.5 7.67 11 8.5 11zm3.5 6.5c2.33 0 4.31-1.46 5.11-3.5H6.89c.8 2.04 2.78 3.5 5.11 3.5z" })
|
|
2205
|
+
}
|
|
2206
|
+
)
|
|
2110
2207
|
}
|
|
2111
2208
|
),
|
|
2112
2209
|
showEmojiPicker && /* @__PURE__ */ jsx(
|
|
@@ -2125,7 +2222,25 @@ var init_TipTapToolbar = __esm({
|
|
|
2125
2222
|
onClick: () => editor.chain().focus().toggleFullscreen().run(),
|
|
2126
2223
|
active: isFullscreen,
|
|
2127
2224
|
title: isFullscreen ? "Exit Fullscreen (Esc)" : "Fullscreen (Ctrl+Shift+F)",
|
|
2128
|
-
children: isFullscreen ?
|
|
2225
|
+
children: isFullscreen ? /* @__PURE__ */ jsx(
|
|
2226
|
+
"svg",
|
|
2227
|
+
{
|
|
2228
|
+
width: "16",
|
|
2229
|
+
height: "16",
|
|
2230
|
+
viewBox: "0 0 24 24",
|
|
2231
|
+
fill: "currentColor",
|
|
2232
|
+
children: /* @__PURE__ */ jsx("path", { d: "M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z" })
|
|
2233
|
+
}
|
|
2234
|
+
) : /* @__PURE__ */ jsx(
|
|
2235
|
+
"svg",
|
|
2236
|
+
{
|
|
2237
|
+
width: "16",
|
|
2238
|
+
height: "16",
|
|
2239
|
+
viewBox: "0 0 24 24",
|
|
2240
|
+
fill: "currentColor",
|
|
2241
|
+
children: /* @__PURE__ */ jsx("path", { d: "M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z" })
|
|
2242
|
+
}
|
|
2243
|
+
)
|
|
2129
2244
|
},
|
|
2130
2245
|
"fullscreen"
|
|
2131
2246
|
);
|
|
@@ -2135,7 +2250,7 @@ var init_TipTapToolbar = __esm({
|
|
|
2135
2250
|
{
|
|
2136
2251
|
onClick: () => editor.chain().focus().print().run(),
|
|
2137
2252
|
title: "Print (Ctrl+P)",
|
|
2138
|
-
children: "
|
|
2253
|
+
children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z" }) })
|
|
2139
2254
|
},
|
|
2140
2255
|
"print"
|
|
2141
2256
|
);
|
|
@@ -2146,7 +2261,7 @@ var init_TipTapToolbar = __esm({
|
|
|
2146
2261
|
onClick: () => editor.chain().focus().undo().run(),
|
|
2147
2262
|
disabled: !editor.can().undo(),
|
|
2148
2263
|
title: "Undo (Ctrl+Z)",
|
|
2149
|
-
children: "
|
|
2264
|
+
children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z" }) })
|
|
2150
2265
|
},
|
|
2151
2266
|
"undo"
|
|
2152
2267
|
);
|
|
@@ -2157,7 +2272,7 @@ var init_TipTapToolbar = __esm({
|
|
|
2157
2272
|
onClick: () => editor.chain().focus().redo().run(),
|
|
2158
2273
|
disabled: !editor.can().redo(),
|
|
2159
2274
|
title: "Redo (Ctrl+Y)",
|
|
2160
|
-
children: "
|
|
2275
|
+
children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z" }) })
|
|
2161
2276
|
},
|
|
2162
2277
|
"redo"
|
|
2163
2278
|
);
|
|
@@ -2700,43 +2815,253 @@ var init_SlateToolbar = __esm({
|
|
|
2700
2815
|
}
|
|
2701
2816
|
);
|
|
2702
2817
|
icons = {
|
|
2703
|
-
bold: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx3(
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2818
|
+
bold: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx3(
|
|
2819
|
+
"path",
|
|
2820
|
+
{
|
|
2821
|
+
fill: "currentColor",
|
|
2822
|
+
d: "M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42zM10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3v-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5z"
|
|
2823
|
+
}
|
|
2824
|
+
) }),
|
|
2825
|
+
italic: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx3(
|
|
2826
|
+
"path",
|
|
2827
|
+
{
|
|
2828
|
+
fill: "currentColor",
|
|
2829
|
+
d: "M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z"
|
|
2830
|
+
}
|
|
2831
|
+
) }),
|
|
2832
|
+
underline: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx3(
|
|
2833
|
+
"path",
|
|
2834
|
+
{
|
|
2835
|
+
fill: "currentColor",
|
|
2836
|
+
d: "M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6zm-7 2v2h14v-2H5z"
|
|
2837
|
+
}
|
|
2838
|
+
) }),
|
|
2839
|
+
strike: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx3(
|
|
2840
|
+
"path",
|
|
2841
|
+
{
|
|
2842
|
+
fill: "currentColor",
|
|
2843
|
+
d: "M10 19h4v-3h-4v3zM5 4v3h5v3h4V7h5V4H5zM3 14h18v-2H3v2z"
|
|
2844
|
+
}
|
|
2845
|
+
) }),
|
|
2846
|
+
code: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx3(
|
|
2847
|
+
"path",
|
|
2848
|
+
{
|
|
2849
|
+
fill: "currentColor",
|
|
2850
|
+
d: "M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"
|
|
2851
|
+
}
|
|
2852
|
+
) }),
|
|
2853
|
+
codeBlock: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx3(
|
|
2854
|
+
"path",
|
|
2855
|
+
{
|
|
2856
|
+
fill: "currentColor",
|
|
2857
|
+
d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-9.5 8.5L7 14l2.5 2.5L8 18l-4-4 4-4 1.5 1.5zm7 5L15 18l4-4-4-4 1.5-1.5L19 11l-2.5 2.5z"
|
|
2858
|
+
}
|
|
2859
|
+
) }),
|
|
2860
|
+
subscript: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx3(
|
|
2861
|
+
"path",
|
|
2862
|
+
{
|
|
2863
|
+
fill: "currentColor",
|
|
2864
|
+
d: "M22 18h-2v1h3v1h-4v-2.5a.5.5 0 01.5-.5h2a.5.5 0 00.5-.5v-.5H18v-1h4v2.5a.5.5 0 01-.5.5h-2a.5.5 0 00-.5.5v.5zM5.88 5h2.66l3.4 5.42h.12L15.5 5h2.62l-4.87 7.38L18.22 20h-2.66l-3.62-5.63h-.12l-3.62 5.63H5.56l4.92-7.62L5.88 5z"
|
|
2865
|
+
}
|
|
2866
|
+
) }),
|
|
2867
|
+
superscript: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx3(
|
|
2868
|
+
"path",
|
|
2869
|
+
{
|
|
2870
|
+
fill: "currentColor",
|
|
2871
|
+
d: "M22 7h-2v1h3v1h-4V6.5a.5.5 0 01.5-.5h2a.5.5 0 00.5-.5v-.5H18V4h4v2.5a.5.5 0 01-.5.5h-2a.5.5 0 00-.5.5v.5zM5.88 5h2.66l3.4 5.42h.12L15.5 5h2.62l-4.87 7.38L18.22 20h-2.66l-3.62-5.63h-.12l-3.62 5.63H5.56l4.92-7.62L5.88 5z"
|
|
2872
|
+
}
|
|
2873
|
+
) }),
|
|
2874
|
+
clearFormatting: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx3(
|
|
2875
|
+
"path",
|
|
2876
|
+
{
|
|
2877
|
+
fill: "currentColor",
|
|
2878
|
+
d: "M3.27 5L2 6.27l6.97 6.97L6.5 19h3l1.57-3.66L16.73 21 18 19.73 3.55 5.27 3.27 5zM6 5v.18L8.82 8h2.4l-.72 1.68 2.1 2.1L14.21 8H20V5H6z"
|
|
2879
|
+
}
|
|
2880
|
+
) }),
|
|
2881
|
+
fontFamily: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx3(
|
|
2882
|
+
"path",
|
|
2883
|
+
{
|
|
2884
|
+
fill: "currentColor",
|
|
2885
|
+
d: "M9.93 13.5h4.14L12 7.98 9.93 13.5zM20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-4.05 16.5l-1.14-3H9.17l-1.12 3H5.96l5.11-13h1.86l5.11 13h-2.09z"
|
|
2886
|
+
}
|
|
2887
|
+
) }),
|
|
2888
|
+
fontSize: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx3(
|
|
2889
|
+
"path",
|
|
2890
|
+
{
|
|
2891
|
+
fill: "currentColor",
|
|
2892
|
+
d: "M9 4v3h5v12h3V7h5V4H9zm-6 8h3v7h3v-7h3v-3H3v3z"
|
|
2893
|
+
}
|
|
2894
|
+
) }),
|
|
2895
|
+
lineHeight: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx3(
|
|
2896
|
+
"path",
|
|
2897
|
+
{
|
|
2898
|
+
fill: "currentColor",
|
|
2899
|
+
d: "M6 7h2.5L5 3.5 1.5 7H4v10H1.5L5 20.5 8.5 17H6V7zm4-2v2h12V5H10zm0 14h12v-2H10v2zm0-6h12v-2H10v2z"
|
|
2900
|
+
}
|
|
2901
|
+
) }),
|
|
2902
|
+
textColor: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx3(
|
|
2903
|
+
"path",
|
|
2904
|
+
{
|
|
2905
|
+
fill: "currentColor",
|
|
2906
|
+
d: "M11 3L5.5 17h2.25l1.12-3h6.25l1.12 3h2.25L13 3h-2zm-1.38 9L12 5.67 14.38 12H9.62z"
|
|
2907
|
+
}
|
|
2908
|
+
) }),
|
|
2909
|
+
backgroundColor: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx3(
|
|
2910
|
+
"path",
|
|
2911
|
+
{
|
|
2912
|
+
fill: "currentColor",
|
|
2913
|
+
d: "M16.56 8.94L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.59-.59 1.54 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.58.59-1.53 0-2.12zM5.21 10L10 5.21 14.79 10H5.21zM19 11.5s-2 2.17-2 3.5c0 1.1.9 2 2 2s2-.9 2-2c0-1.33-2-3.5-2-3.5zM2 20h20v4H2v-4z"
|
|
2914
|
+
}
|
|
2915
|
+
) }),
|
|
2916
|
+
alignLeft: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx3(
|
|
2917
|
+
"path",
|
|
2918
|
+
{
|
|
2919
|
+
fill: "currentColor",
|
|
2920
|
+
d: "M15 15H3v2h12v-2zm0-8H3v2h12V7zM3 13h18v-2H3v2zm0 8h18v-2H3v2zM3 3v2h18V3H3z"
|
|
2921
|
+
}
|
|
2922
|
+
) }),
|
|
2923
|
+
alignCenter: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx3(
|
|
2924
|
+
"path",
|
|
2925
|
+
{
|
|
2926
|
+
fill: "currentColor",
|
|
2927
|
+
d: "M7 15v2h10v-2H7zm-4 6h18v-2H3v2zm0-8h18v-2H3v2zm4-6v2h10V7H7zM3 3v2h18V3H3z"
|
|
2928
|
+
}
|
|
2929
|
+
) }),
|
|
2930
|
+
alignRight: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx3(
|
|
2931
|
+
"path",
|
|
2932
|
+
{
|
|
2933
|
+
fill: "currentColor",
|
|
2934
|
+
d: "M3 21h18v-2H3v2zm6-4h12v-2H9v2zm-6-4h18v-2H3v2zm6-4h12V7H9v2zM3 3v2h18V3H3z"
|
|
2935
|
+
}
|
|
2936
|
+
) }),
|
|
2937
|
+
alignJustify: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx3(
|
|
2938
|
+
"path",
|
|
2939
|
+
{
|
|
2940
|
+
fill: "currentColor",
|
|
2941
|
+
d: "M3 21h18v-2H3v2zm0-4h18v-2H3v2zm0-4h18v-2H3v2zm0-4h18V7H3v2zm0-6v2h18V3H3z"
|
|
2942
|
+
}
|
|
2943
|
+
) }),
|
|
2944
|
+
indent: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx3(
|
|
2945
|
+
"path",
|
|
2946
|
+
{
|
|
2947
|
+
fill: "currentColor",
|
|
2948
|
+
d: "M3 21h18v-2H3v2zM3 8v8l4-4-4-4zm8 9h10v-2H11v2zM3 3v2h18V3H3zm8 6h10V7H11v2zm0 4h10v-2H11v2z"
|
|
2949
|
+
}
|
|
2950
|
+
) }),
|
|
2951
|
+
outdent: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx3(
|
|
2952
|
+
"path",
|
|
2953
|
+
{
|
|
2954
|
+
fill: "currentColor",
|
|
2955
|
+
d: "M11 17h10v-2H11v2zm-8-5l4 4V8l-4 4zm0 9h18v-2H3v2zM3 3v2h18V3H3zm8 6h10V7H11v2zm0 4h10v-2H11v2z"
|
|
2956
|
+
}
|
|
2957
|
+
) }),
|
|
2958
|
+
bulletList: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx3(
|
|
2959
|
+
"path",
|
|
2960
|
+
{
|
|
2961
|
+
fill: "currentColor",
|
|
2962
|
+
d: "M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5zm0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5zM7 19h14v-2H7v2zm0-6h14v-2H7v2zm0-8v2h14V5H7z"
|
|
2963
|
+
}
|
|
2964
|
+
) }),
|
|
2965
|
+
orderedList: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx3(
|
|
2966
|
+
"path",
|
|
2967
|
+
{
|
|
2968
|
+
fill: "currentColor",
|
|
2969
|
+
d: "M2 17h2v.5H3v1h1v.5H2v1h3v-4H2v1zm1-9h1V4H2v1h1v3zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2v1zm5-6v2h14V5H7zm0 14h14v-2H7v2zm0-6h14v-2H7v2z"
|
|
2970
|
+
}
|
|
2971
|
+
) }),
|
|
2972
|
+
heading1: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx3(
|
|
2973
|
+
"path",
|
|
2974
|
+
{
|
|
2975
|
+
fill: "currentColor",
|
|
2976
|
+
d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14h-2V9h-2V7h4v10z"
|
|
2977
|
+
}
|
|
2978
|
+
) }),
|
|
2979
|
+
heading2: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx3(
|
|
2980
|
+
"path",
|
|
2981
|
+
{
|
|
2982
|
+
fill: "currentColor",
|
|
2983
|
+
d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 8c0 1.1-.9 2-2 2h-2v2h4v2H9v-4c0-1.1.9-2 2-2h2V9H9V7h4c1.1 0 2 .9 2 2v2z"
|
|
2984
|
+
}
|
|
2985
|
+
) }),
|
|
2986
|
+
heading3: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx3(
|
|
2987
|
+
"path",
|
|
2988
|
+
{
|
|
2989
|
+
fill: "currentColor",
|
|
2990
|
+
d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 8c0 1.1-.9 2-2 2v0c1.1 0 2 .9 2 2v1c0 1.1-.9 2-2 2H9v-2h4v-2h-2v-2h2V9H9V7h4c1.1 0 2 .9 2 2v2z"
|
|
2991
|
+
}
|
|
2992
|
+
) }),
|
|
2728
2993
|
blockquote: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx3("path", { fill: "currentColor", d: "M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z" }) }),
|
|
2729
2994
|
horizontalRule: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx3("path", { fill: "currentColor", d: "M4 11h16v2H4z" }) }),
|
|
2730
|
-
link: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx3(
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2995
|
+
link: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx3(
|
|
2996
|
+
"path",
|
|
2997
|
+
{
|
|
2998
|
+
fill: "currentColor",
|
|
2999
|
+
d: "M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"
|
|
3000
|
+
}
|
|
3001
|
+
) }),
|
|
3002
|
+
unlink: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx3(
|
|
3003
|
+
"path",
|
|
3004
|
+
{
|
|
3005
|
+
fill: "currentColor",
|
|
3006
|
+
d: "M17 7h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1 0 1.43-.98 2.63-2.31 2.98l1.46 1.46C20.88 15.61 22 13.95 22 12c0-2.76-2.24-5-5-5zm-1 4h-2.19l2 2H16v-2zM2 4.27l3.11 3.11A4.991 4.991 0 002 12c0 2.76 2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1 0-1.59 1.21-2.9 2.76-3.07L8.73 11H8v2h2.73L13 15.27V17h1.73l4.01 4L20 19.74 3.27 3 2 4.27z"
|
|
3007
|
+
}
|
|
3008
|
+
) }),
|
|
3009
|
+
image: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx3(
|
|
3010
|
+
"path",
|
|
3011
|
+
{
|
|
3012
|
+
fill: "currentColor",
|
|
3013
|
+
d: "M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"
|
|
3014
|
+
}
|
|
3015
|
+
) }),
|
|
3016
|
+
video: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx3(
|
|
3017
|
+
"path",
|
|
3018
|
+
{
|
|
3019
|
+
fill: "currentColor",
|
|
3020
|
+
d: "M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l4 4v-11l-4 4z"
|
|
3021
|
+
}
|
|
3022
|
+
) }),
|
|
3023
|
+
table: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx3(
|
|
3024
|
+
"path",
|
|
3025
|
+
{
|
|
3026
|
+
fill: "currentColor",
|
|
3027
|
+
d: "M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM8 20H4v-4h4v4zm0-6H4v-4h4v4zm0-6H4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6h-4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6h-4V4h4v4z"
|
|
3028
|
+
}
|
|
3029
|
+
) }),
|
|
3030
|
+
emoji: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx3(
|
|
3031
|
+
"path",
|
|
3032
|
+
{
|
|
3033
|
+
fill: "currentColor",
|
|
3034
|
+
d: "M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm3.5-9c.83 0 1.5-.67 1.5-1.5S16.33 8 15.5 8 14 8.67 14 9.5s.67 1.5 1.5 1.5zm-7 0c.83 0 1.5-.67 1.5-1.5S9.33 8 8.5 8 7 8.67 7 9.5 7.67 11 8.5 11zm3.5 6.5c2.33 0 4.31-1.46 5.11-3.5H6.89c.8 2.04 2.78 3.5 5.11 3.5z"
|
|
3035
|
+
}
|
|
3036
|
+
) }),
|
|
3037
|
+
undo: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx3(
|
|
3038
|
+
"path",
|
|
3039
|
+
{
|
|
3040
|
+
fill: "currentColor",
|
|
3041
|
+
d: "M12.5 8c-2.65 0-5.05 1.04-6.83 2.73L3 8v9h9l-3.01-3c1.37-1.12 3.11-1.8 5.01-1.8 3.33 0 6.17 2.11 7.22 5.06l1.98-.65C21.79 12.58 17.54 8 12.5 8z"
|
|
3042
|
+
}
|
|
3043
|
+
) }),
|
|
3044
|
+
redo: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx3(
|
|
3045
|
+
"path",
|
|
3046
|
+
{
|
|
3047
|
+
fill: "currentColor",
|
|
3048
|
+
d: "M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22l1.98.65c1.05-3.19 4.05-5.47 7.98-5.47 1.9 0 3.64.68 5.01 1.8L13.5 15h9V6l-4.1 4.6z"
|
|
3049
|
+
}
|
|
3050
|
+
) }),
|
|
3051
|
+
fullscreen: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx3(
|
|
3052
|
+
"path",
|
|
3053
|
+
{
|
|
3054
|
+
fill: "currentColor",
|
|
3055
|
+
d: "M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"
|
|
3056
|
+
}
|
|
3057
|
+
) }),
|
|
3058
|
+
print: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx3(
|
|
3059
|
+
"path",
|
|
3060
|
+
{
|
|
3061
|
+
fill: "currentColor",
|
|
3062
|
+
d: "M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"
|
|
3063
|
+
}
|
|
3064
|
+
) })
|
|
2740
3065
|
};
|
|
2741
3066
|
SlateToolbar = ({
|
|
2742
3067
|
editor,
|
|
@@ -2757,7 +3082,9 @@ var init_SlateToolbar = __esm({
|
|
|
2757
3082
|
const [showLinkDialog, setShowLinkDialog] = useState2(false);
|
|
2758
3083
|
const [linkUrl, setLinkUrl] = useState2("");
|
|
2759
3084
|
const linkDialogRef = useRef2(null);
|
|
2760
|
-
const [showColorPicker, setShowColorPicker] = useState2(
|
|
3085
|
+
const [showColorPicker, setShowColorPicker] = useState2(
|
|
3086
|
+
null
|
|
3087
|
+
);
|
|
2761
3088
|
const colorPickerRef = useRef2(null);
|
|
2762
3089
|
useEffect3(() => {
|
|
2763
3090
|
const handleClickOutside = (event) => {
|
|
@@ -2803,7 +3130,10 @@ var init_SlateToolbar = __esm({
|
|
|
2803
3130
|
const insertHorizontalRule = useCallback2(() => {
|
|
2804
3131
|
const hr = { type: "horizontal-rule", children: [{ text: "" }] };
|
|
2805
3132
|
Transforms.insertNodes(editor, hr);
|
|
2806
|
-
Transforms.insertNodes(editor, {
|
|
3133
|
+
Transforms.insertNodes(editor, {
|
|
3134
|
+
type: "paragraph",
|
|
3135
|
+
children: [{ text: "" }]
|
|
3136
|
+
});
|
|
2807
3137
|
}, [editor]);
|
|
2808
3138
|
const insertTable = useCallback2(() => {
|
|
2809
3139
|
const table = {
|
|
@@ -3120,45 +3450,45 @@ var init_SlateToolbar = __esm({
|
|
|
3120
3450
|
);
|
|
3121
3451
|
// Links
|
|
3122
3452
|
case "link":
|
|
3123
|
-
return /* @__PURE__ */ jsxs3(
|
|
3124
|
-
|
|
3125
|
-
ToolbarButton,
|
|
3126
|
-
{
|
|
3127
|
-
onClick: () => setShowLinkDialog(!showLinkDialog),
|
|
3128
|
-
title: "Insert Link",
|
|
3129
|
-
children: icons.link
|
|
3130
|
-
}
|
|
3131
|
-
),
|
|
3132
|
-
showLinkDialog && /* @__PURE__ */ jsxs3("div", { className: "rte-builder-toolbar-dropdown-content", children: [
|
|
3133
|
-
/* @__PURE__ */ jsx3(
|
|
3134
|
-
"input",
|
|
3135
|
-
{
|
|
3136
|
-
type: "url",
|
|
3137
|
-
placeholder: "Enter URL...",
|
|
3138
|
-
value: linkUrl,
|
|
3139
|
-
onChange: (e) => setLinkUrl(e.target.value),
|
|
3140
|
-
onKeyDown: (e) => {
|
|
3141
|
-
if (e.key === "Enter") {
|
|
3142
|
-
e.preventDefault();
|
|
3143
|
-
insertLink();
|
|
3144
|
-
}
|
|
3145
|
-
},
|
|
3146
|
-
autoFocus: true
|
|
3147
|
-
}
|
|
3148
|
-
),
|
|
3149
|
-
/* @__PURE__ */ jsx3("button", { onClick: insertLink, children: "Insert" })
|
|
3150
|
-
] })
|
|
3151
|
-
] }, button);
|
|
3152
|
-
case "unlink":
|
|
3153
|
-
return /* @__PURE__ */ jsx3(
|
|
3154
|
-
ToolbarButton,
|
|
3453
|
+
return /* @__PURE__ */ jsxs3(
|
|
3454
|
+
"div",
|
|
3155
3455
|
{
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
children:
|
|
3456
|
+
className: "rte-builder-toolbar-dropdown",
|
|
3457
|
+
ref: linkDialogRef,
|
|
3458
|
+
children: [
|
|
3459
|
+
/* @__PURE__ */ jsx3(
|
|
3460
|
+
ToolbarButton,
|
|
3461
|
+
{
|
|
3462
|
+
onClick: () => setShowLinkDialog(!showLinkDialog),
|
|
3463
|
+
title: "Insert Link",
|
|
3464
|
+
children: icons.link
|
|
3465
|
+
}
|
|
3466
|
+
),
|
|
3467
|
+
showLinkDialog && /* @__PURE__ */ jsxs3("div", { className: "rte-builder-toolbar-dropdown-content", children: [
|
|
3468
|
+
/* @__PURE__ */ jsx3(
|
|
3469
|
+
"input",
|
|
3470
|
+
{
|
|
3471
|
+
type: "url",
|
|
3472
|
+
placeholder: "Enter URL...",
|
|
3473
|
+
value: linkUrl,
|
|
3474
|
+
onChange: (e) => setLinkUrl(e.target.value),
|
|
3475
|
+
onKeyDown: (e) => {
|
|
3476
|
+
if (e.key === "Enter") {
|
|
3477
|
+
e.preventDefault();
|
|
3478
|
+
insertLink();
|
|
3479
|
+
}
|
|
3480
|
+
},
|
|
3481
|
+
autoFocus: true
|
|
3482
|
+
}
|
|
3483
|
+
),
|
|
3484
|
+
/* @__PURE__ */ jsx3("button", { onClick: insertLink, children: "Insert" })
|
|
3485
|
+
] })
|
|
3486
|
+
]
|
|
3159
3487
|
},
|
|
3160
3488
|
button
|
|
3161
3489
|
);
|
|
3490
|
+
case "unlink":
|
|
3491
|
+
return /* @__PURE__ */ jsx3(ToolbarButton, { onClick: removeLink, title: "Remove Link", children: icons.unlink }, button);
|
|
3162
3492
|
// Media
|
|
3163
3493
|
case "image":
|
|
3164
3494
|
return /* @__PURE__ */ jsx3(
|
|
@@ -3196,82 +3526,104 @@ var init_SlateToolbar = __esm({
|
|
|
3196
3526
|
);
|
|
3197
3527
|
// Colors
|
|
3198
3528
|
case "textColor":
|
|
3199
|
-
return /* @__PURE__ */ jsxs3(
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3529
|
+
return /* @__PURE__ */ jsxs3(
|
|
3530
|
+
"div",
|
|
3531
|
+
{
|
|
3532
|
+
className: "rte-builder-toolbar-dropdown",
|
|
3533
|
+
ref: colorPickerRef,
|
|
3534
|
+
children: [
|
|
3535
|
+
/* @__PURE__ */ jsx3(
|
|
3536
|
+
ToolbarButton,
|
|
3537
|
+
{
|
|
3538
|
+
onClick: () => setShowColorPicker(showColorPicker === "text" ? null : "text"),
|
|
3539
|
+
title: "Text Color",
|
|
3540
|
+
children: icons.textColor
|
|
3541
|
+
}
|
|
3542
|
+
),
|
|
3543
|
+
showColorPicker === "text" && /* @__PURE__ */ jsx3("div", { className: "rte-builder-toolbar-dropdown-content rte-builder-color-picker", children: colors.map((color) => /* @__PURE__ */ jsx3(
|
|
3544
|
+
"button",
|
|
3545
|
+
{
|
|
3546
|
+
className: "rte-builder-color-swatch",
|
|
3547
|
+
style: { backgroundColor: color },
|
|
3548
|
+
onClick: () => setColor(color, "text"),
|
|
3549
|
+
title: color
|
|
3550
|
+
},
|
|
3551
|
+
color
|
|
3552
|
+
)) })
|
|
3553
|
+
]
|
|
3554
|
+
},
|
|
3555
|
+
button
|
|
3556
|
+
);
|
|
3219
3557
|
case "backgroundColor":
|
|
3220
|
-
return /* @__PURE__ */ jsxs3(
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
title: color
|
|
3236
|
-
},
|
|
3237
|
-
color
|
|
3238
|
-
)) })
|
|
3239
|
-
] }, button);
|
|
3240
|
-
// Emoji
|
|
3241
|
-
case "emoji":
|
|
3242
|
-
return /* @__PURE__ */ jsxs3("div", { className: "rte-builder-toolbar-dropdown", ref: emojiPickerRef, children: [
|
|
3243
|
-
/* @__PURE__ */ jsx3(
|
|
3244
|
-
ToolbarButton,
|
|
3245
|
-
{
|
|
3246
|
-
onClick: () => setShowEmojiPicker(!showEmojiPicker),
|
|
3247
|
-
title: "Insert Emoji",
|
|
3248
|
-
children: icons.emoji
|
|
3249
|
-
}
|
|
3250
|
-
),
|
|
3251
|
-
showEmojiPicker && /* @__PURE__ */ jsxs3("div", { className: "rte-builder-emoji-picker", children: [
|
|
3252
|
-
/* @__PURE__ */ jsx3("div", { className: "rte-builder-emoji-categories", children: Object.entries(EMOJI_CATEGORIES).map(([key, category]) => /* @__PURE__ */ jsx3(
|
|
3253
|
-
"button",
|
|
3254
|
-
{
|
|
3255
|
-
className: `rte-builder-emoji-category-btn ${selectedEmojiCategory === key ? "active" : ""}`,
|
|
3256
|
-
onClick: () => setSelectedEmojiCategory(key),
|
|
3257
|
-
title: category.label,
|
|
3258
|
-
children: category.emojis[0]
|
|
3259
|
-
},
|
|
3260
|
-
key
|
|
3261
|
-
)) }),
|
|
3262
|
-
/* @__PURE__ */ jsx3("div", { className: "rte-builder-emoji-grid", children: EMOJI_CATEGORIES[selectedEmojiCategory]?.emojis.map(
|
|
3263
|
-
(emoji, idx) => /* @__PURE__ */ jsx3(
|
|
3558
|
+
return /* @__PURE__ */ jsxs3(
|
|
3559
|
+
"div",
|
|
3560
|
+
{
|
|
3561
|
+
className: "rte-builder-toolbar-dropdown",
|
|
3562
|
+
ref: colorPickerRef,
|
|
3563
|
+
children: [
|
|
3564
|
+
/* @__PURE__ */ jsx3(
|
|
3565
|
+
ToolbarButton,
|
|
3566
|
+
{
|
|
3567
|
+
onClick: () => setShowColorPicker(showColorPicker === "bg" ? null : "bg"),
|
|
3568
|
+
title: "Background Color",
|
|
3569
|
+
children: icons.backgroundColor
|
|
3570
|
+
}
|
|
3571
|
+
),
|
|
3572
|
+
showColorPicker === "bg" && /* @__PURE__ */ jsx3("div", { className: "rte-builder-toolbar-dropdown-content rte-builder-color-picker", children: colors.map((color) => /* @__PURE__ */ jsx3(
|
|
3264
3573
|
"button",
|
|
3265
3574
|
{
|
|
3266
|
-
className: "rte-builder-
|
|
3267
|
-
|
|
3268
|
-
|
|
3575
|
+
className: "rte-builder-color-swatch",
|
|
3576
|
+
style: { backgroundColor: color },
|
|
3577
|
+
onClick: () => setColor(color, "bg"),
|
|
3578
|
+
title: color
|
|
3269
3579
|
},
|
|
3270
|
-
|
|
3271
|
-
)
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3580
|
+
color
|
|
3581
|
+
)) })
|
|
3582
|
+
]
|
|
3583
|
+
},
|
|
3584
|
+
button
|
|
3585
|
+
);
|
|
3586
|
+
// Emoji
|
|
3587
|
+
case "emoji":
|
|
3588
|
+
return /* @__PURE__ */ jsxs3(
|
|
3589
|
+
"div",
|
|
3590
|
+
{
|
|
3591
|
+
className: "rte-builder-toolbar-dropdown",
|
|
3592
|
+
ref: emojiPickerRef,
|
|
3593
|
+
children: [
|
|
3594
|
+
/* @__PURE__ */ jsx3(
|
|
3595
|
+
ToolbarButton,
|
|
3596
|
+
{
|
|
3597
|
+
onClick: () => setShowEmojiPicker(!showEmojiPicker),
|
|
3598
|
+
title: "Insert Emoji",
|
|
3599
|
+
children: icons.emoji
|
|
3600
|
+
}
|
|
3601
|
+
),
|
|
3602
|
+
showEmojiPicker && /* @__PURE__ */ jsxs3("div", { className: "rte-builder-emoji-picker", children: [
|
|
3603
|
+
/* @__PURE__ */ jsx3("div", { className: "rte-builder-emoji-categories", children: Object.entries(EMOJI_CATEGORIES).map(([key, category]) => /* @__PURE__ */ jsx3(
|
|
3604
|
+
"button",
|
|
3605
|
+
{
|
|
3606
|
+
className: `rte-builder-emoji-category-btn ${selectedEmojiCategory === key ? "active" : ""}`,
|
|
3607
|
+
onClick: () => setSelectedEmojiCategory(key),
|
|
3608
|
+
title: category.label,
|
|
3609
|
+
children: category.emojis[0]
|
|
3610
|
+
},
|
|
3611
|
+
key
|
|
3612
|
+
)) }),
|
|
3613
|
+
/* @__PURE__ */ jsx3("div", { className: "rte-builder-emoji-grid", children: EMOJI_CATEGORIES[selectedEmojiCategory]?.emojis.map((emoji, idx) => /* @__PURE__ */ jsx3(
|
|
3614
|
+
"button",
|
|
3615
|
+
{
|
|
3616
|
+
className: "rte-builder-emoji-btn",
|
|
3617
|
+
onClick: () => insertEmoji(emoji),
|
|
3618
|
+
children: emoji
|
|
3619
|
+
},
|
|
3620
|
+
idx
|
|
3621
|
+
)) })
|
|
3622
|
+
] })
|
|
3623
|
+
]
|
|
3624
|
+
},
|
|
3625
|
+
button
|
|
3626
|
+
);
|
|
3275
3627
|
// Actions
|
|
3276
3628
|
case "undo":
|
|
3277
3629
|
return /* @__PURE__ */ jsx3(
|
|
@@ -3882,7 +4234,9 @@ import {
|
|
|
3882
4234
|
UNDO_COMMAND,
|
|
3883
4235
|
REDO_COMMAND
|
|
3884
4236
|
} from "lexical";
|
|
3885
|
-
import {
|
|
4237
|
+
import {
|
|
4238
|
+
$createHeadingNode
|
|
4239
|
+
} from "@lexical/rich-text";
|
|
3886
4240
|
import {
|
|
3887
4241
|
INSERT_ORDERED_LIST_COMMAND,
|
|
3888
4242
|
INSERT_UNORDERED_LIST_COMMAND
|
|
@@ -3892,9 +4246,7 @@ import { $setBlocksType } from "@lexical/selection";
|
|
|
3892
4246
|
import { $createQuoteNode } from "@lexical/rich-text";
|
|
3893
4247
|
import { $createCodeNode } from "@lexical/code";
|
|
3894
4248
|
import { INSERT_HORIZONTAL_RULE_COMMAND } from "@lexical/react/LexicalHorizontalRuleNode";
|
|
3895
|
-
import {
|
|
3896
|
-
INSERT_TABLE_COMMAND
|
|
3897
|
-
} from "@lexical/table";
|
|
4249
|
+
import { INSERT_TABLE_COMMAND } from "@lexical/table";
|
|
3898
4250
|
import { $createParagraphNode } from "lexical";
|
|
3899
4251
|
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
3900
4252
|
var ToolbarButton2, icons2, LexicalToolbar;
|
|
@@ -3923,40 +4275,232 @@ var init_LexicalToolbar = __esm({
|
|
|
3923
4275
|
}
|
|
3924
4276
|
);
|
|
3925
4277
|
icons2 = {
|
|
3926
|
-
bold: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx5(
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
4278
|
+
bold: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx5(
|
|
4279
|
+
"path",
|
|
4280
|
+
{
|
|
4281
|
+
fill: "currentColor",
|
|
4282
|
+
d: "M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42zM10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3v-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5z"
|
|
4283
|
+
}
|
|
4284
|
+
) }),
|
|
4285
|
+
italic: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx5(
|
|
4286
|
+
"path",
|
|
4287
|
+
{
|
|
4288
|
+
fill: "currentColor",
|
|
4289
|
+
d: "M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z"
|
|
4290
|
+
}
|
|
4291
|
+
) }),
|
|
4292
|
+
underline: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx5(
|
|
4293
|
+
"path",
|
|
4294
|
+
{
|
|
4295
|
+
fill: "currentColor",
|
|
4296
|
+
d: "M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6zm-7 2v2h14v-2H5z"
|
|
4297
|
+
}
|
|
4298
|
+
) }),
|
|
4299
|
+
strike: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx5(
|
|
4300
|
+
"path",
|
|
4301
|
+
{
|
|
4302
|
+
fill: "currentColor",
|
|
4303
|
+
d: "M10 19h4v-3h-4v3zM5 4v3h5v3h4V7h5V4H5zM3 14h18v-2H3v2z"
|
|
4304
|
+
}
|
|
4305
|
+
) }),
|
|
4306
|
+
code: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx5(
|
|
4307
|
+
"path",
|
|
4308
|
+
{
|
|
4309
|
+
fill: "currentColor",
|
|
4310
|
+
d: "M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"
|
|
4311
|
+
}
|
|
4312
|
+
) }),
|
|
4313
|
+
codeBlock: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx5(
|
|
4314
|
+
"path",
|
|
4315
|
+
{
|
|
4316
|
+
fill: "currentColor",
|
|
4317
|
+
d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-9.5 8.5L7 14l2.5 2.5L8 18l-4-4 4-4 1.5 1.5zm7 5L15 18l4-4-4-4 1.5-1.5L19 11l-2.5 2.5z"
|
|
4318
|
+
}
|
|
4319
|
+
) }),
|
|
4320
|
+
subscript: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx5(
|
|
4321
|
+
"path",
|
|
4322
|
+
{
|
|
4323
|
+
fill: "currentColor",
|
|
4324
|
+
d: "M22 18h-2v1h3v1h-4v-2.5a.5.5 0 01.5-.5h2a.5.5 0 00.5-.5v-.5H18v-1h4v2.5a.5.5 0 01-.5.5h-2a.5.5 0 00-.5.5v.5zM5.88 5h2.66l3.4 5.42h.12L15.5 5h2.62l-4.87 7.38L18.22 20h-2.66l-3.62-5.63h-.12l-3.62 5.63H5.56l4.92-7.62L5.88 5z"
|
|
4325
|
+
}
|
|
4326
|
+
) }),
|
|
4327
|
+
superscript: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx5(
|
|
4328
|
+
"path",
|
|
4329
|
+
{
|
|
4330
|
+
fill: "currentColor",
|
|
4331
|
+
d: "M22 7h-2v1h3v1h-4V6.5a.5.5 0 01.5-.5h2a.5.5 0 00.5-.5v-.5H18V4h4v2.5a.5.5 0 01-.5.5h-2a.5.5 0 00-.5.5v.5zM5.88 5h2.66l3.4 5.42h.12L15.5 5h2.62l-4.87 7.38L18.22 20h-2.66l-3.62-5.63h-.12l-3.62 5.63H5.56l4.92-7.62L5.88 5z"
|
|
4332
|
+
}
|
|
4333
|
+
) }),
|
|
4334
|
+
clearFormatting: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx5(
|
|
4335
|
+
"path",
|
|
4336
|
+
{
|
|
4337
|
+
fill: "currentColor",
|
|
4338
|
+
d: "M3.27 5L2 6.27l6.97 6.97L6.5 19h3l1.57-3.66L16.73 21 18 19.73 3.55 5.27 3.27 5zM6 5v.18L8.82 8h2.4l-.72 1.68 2.1 2.1L14.21 8H20V5H6z"
|
|
4339
|
+
}
|
|
4340
|
+
) }),
|
|
4341
|
+
alignLeft: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx5(
|
|
4342
|
+
"path",
|
|
4343
|
+
{
|
|
4344
|
+
fill: "currentColor",
|
|
4345
|
+
d: "M15 15H3v2h12v-2zm0-8H3v2h12V7zM3 13h18v-2H3v2zm0 8h18v-2H3v2zM3 3v2h18V3H3z"
|
|
4346
|
+
}
|
|
4347
|
+
) }),
|
|
4348
|
+
alignCenter: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx5(
|
|
4349
|
+
"path",
|
|
4350
|
+
{
|
|
4351
|
+
fill: "currentColor",
|
|
4352
|
+
d: "M7 15v2h10v-2H7zm-4 6h18v-2H3v2zm0-8h18v-2H3v2zm4-6v2h10V7H7zM3 3v2h18V3H3z"
|
|
4353
|
+
}
|
|
4354
|
+
) }),
|
|
4355
|
+
alignRight: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx5(
|
|
4356
|
+
"path",
|
|
4357
|
+
{
|
|
4358
|
+
fill: "currentColor",
|
|
4359
|
+
d: "M3 21h18v-2H3v2zm6-4h12v-2H9v2zm-6-4h18v-2H3v2zm6-4h12V7H9v2zM3 3v2h18V3H3z"
|
|
4360
|
+
}
|
|
4361
|
+
) }),
|
|
4362
|
+
alignJustify: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx5(
|
|
4363
|
+
"path",
|
|
4364
|
+
{
|
|
4365
|
+
fill: "currentColor",
|
|
4366
|
+
d: "M3 21h18v-2H3v2zm0-4h18v-2H3v2zm0-4h18v-2H3v2zm0-4h18V7H3v2zm0-6v2h18V3H3z"
|
|
4367
|
+
}
|
|
4368
|
+
) }),
|
|
4369
|
+
indent: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx5(
|
|
4370
|
+
"path",
|
|
4371
|
+
{
|
|
4372
|
+
fill: "currentColor",
|
|
4373
|
+
d: "M3 21h18v-2H3v2zM3 8v8l4-4-4-4zm8 9h10v-2H11v2zM3 3v2h18V3H3zm8 6h10V7H11v2zm0 4h10v-2H11v2z"
|
|
4374
|
+
}
|
|
4375
|
+
) }),
|
|
4376
|
+
outdent: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx5(
|
|
4377
|
+
"path",
|
|
4378
|
+
{
|
|
4379
|
+
fill: "currentColor",
|
|
4380
|
+
d: "M11 17h10v-2H11v2zm-8-5l4 4V8l-4 4zm0 9h18v-2H3v2zM3 3v2h18V3H3zm8 6h10V7H11v2zm0 4h10v-2H11v2z"
|
|
4381
|
+
}
|
|
4382
|
+
) }),
|
|
4383
|
+
bulletList: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx5(
|
|
4384
|
+
"path",
|
|
4385
|
+
{
|
|
4386
|
+
fill: "currentColor",
|
|
4387
|
+
d: "M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5zm0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5zM7 19h14v-2H7v2zm0-6h14v-2H7v2zm0-8v2h14V5H7z"
|
|
4388
|
+
}
|
|
4389
|
+
) }),
|
|
4390
|
+
orderedList: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx5(
|
|
4391
|
+
"path",
|
|
4392
|
+
{
|
|
4393
|
+
fill: "currentColor",
|
|
4394
|
+
d: "M2 17h2v.5H3v1h1v.5H2v1h3v-4H2v1zm1-9h1V4H2v1h1v3zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2v1zm5-6v2h14V5H7zm0 14h14v-2H7v2zm0-6h14v-2H7v2z"
|
|
4395
|
+
}
|
|
4396
|
+
) }),
|
|
4397
|
+
heading1: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx5(
|
|
4398
|
+
"path",
|
|
4399
|
+
{
|
|
4400
|
+
fill: "currentColor",
|
|
4401
|
+
d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14h-2V9h-2V7h4v10z"
|
|
4402
|
+
}
|
|
4403
|
+
) }),
|
|
4404
|
+
heading2: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx5(
|
|
4405
|
+
"path",
|
|
4406
|
+
{
|
|
4407
|
+
fill: "currentColor",
|
|
4408
|
+
d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 8c0 1.1-.9 2-2 2h-2v2h4v2H9v-4c0-1.1.9-2 2-2h2V9H9V7h4c1.1 0 2 .9 2 2v2z"
|
|
4409
|
+
}
|
|
4410
|
+
) }),
|
|
4411
|
+
heading3: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx5(
|
|
4412
|
+
"path",
|
|
4413
|
+
{
|
|
4414
|
+
fill: "currentColor",
|
|
4415
|
+
d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 8c0 1.1-.9 2-2 2v0c1.1 0 2 .9 2 2v1c0 1.1-.9 2-2 2H9v-2h4v-2h-2v-2h2V9H9V7h4c1.1 0 2 .9 2 2v2z"
|
|
4416
|
+
}
|
|
4417
|
+
) }),
|
|
3946
4418
|
blockquote: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx5("path", { fill: "currentColor", d: "M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z" }) }),
|
|
3947
4419
|
horizontalRule: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx5("path", { fill: "currentColor", d: "M4 11h16v2H4z" }) }),
|
|
3948
|
-
link: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx5(
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
4420
|
+
link: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx5(
|
|
4421
|
+
"path",
|
|
4422
|
+
{
|
|
4423
|
+
fill: "currentColor",
|
|
4424
|
+
d: "M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"
|
|
4425
|
+
}
|
|
4426
|
+
) }),
|
|
4427
|
+
unlink: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx5(
|
|
4428
|
+
"path",
|
|
4429
|
+
{
|
|
4430
|
+
fill: "currentColor",
|
|
4431
|
+
d: "M17 7h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1 0 1.43-.98 2.63-2.31 2.98l1.46 1.46C20.88 15.61 22 13.95 22 12c0-2.76-2.24-5-5-5zm-1 4h-2.19l2 2H16v-2zM2 4.27l3.11 3.11A4.991 4.991 0 002 12c0 2.76 2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1 0-1.59 1.21-2.9 2.76-3.07L8.73 11H8v2h2.73L13 15.27V17h1.73l4.01 4L20 19.74 3.27 3 2 4.27z"
|
|
4432
|
+
}
|
|
4433
|
+
) }),
|
|
4434
|
+
image: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx5(
|
|
4435
|
+
"path",
|
|
4436
|
+
{
|
|
4437
|
+
fill: "currentColor",
|
|
4438
|
+
d: "M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"
|
|
4439
|
+
}
|
|
4440
|
+
) }),
|
|
4441
|
+
video: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx5(
|
|
4442
|
+
"path",
|
|
4443
|
+
{
|
|
4444
|
+
fill: "currentColor",
|
|
4445
|
+
d: "M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l4 4v-11l-4 4z"
|
|
4446
|
+
}
|
|
4447
|
+
) }),
|
|
4448
|
+
table: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx5(
|
|
4449
|
+
"path",
|
|
4450
|
+
{
|
|
4451
|
+
fill: "currentColor",
|
|
4452
|
+
d: "M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM8 20H4v-4h4v4zm0-6H4v-4h4v4zm0-6H4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6h-4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6h-4V4h4v4z"
|
|
4453
|
+
}
|
|
4454
|
+
) }),
|
|
4455
|
+
emoji: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx5(
|
|
4456
|
+
"path",
|
|
4457
|
+
{
|
|
4458
|
+
fill: "currentColor",
|
|
4459
|
+
d: "M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm3.5-9c.83 0 1.5-.67 1.5-1.5S16.33 8 15.5 8 14 8.67 14 9.5s.67 1.5 1.5 1.5zm-7 0c.83 0 1.5-.67 1.5-1.5S9.33 8 8.5 8 7 8.67 7 9.5 7.67 11 8.5 11zm3.5 6.5c2.33 0 4.31-1.46 5.11-3.5H6.89c.8 2.04 2.78 3.5 5.11 3.5z"
|
|
4460
|
+
}
|
|
4461
|
+
) }),
|
|
4462
|
+
undo: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx5(
|
|
4463
|
+
"path",
|
|
4464
|
+
{
|
|
4465
|
+
fill: "currentColor",
|
|
4466
|
+
d: "M12.5 8c-2.65 0-5.05 1.04-6.83 2.73L3 8v9h9l-3.01-3c1.37-1.12 3.11-1.8 5.01-1.8 3.33 0 6.17 2.11 7.22 5.06l1.98-.65C21.79 12.58 17.54 8 12.5 8z"
|
|
4467
|
+
}
|
|
4468
|
+
) }),
|
|
4469
|
+
redo: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx5(
|
|
4470
|
+
"path",
|
|
4471
|
+
{
|
|
4472
|
+
fill: "currentColor",
|
|
4473
|
+
d: "M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22l1.98.65c1.05-3.19 4.05-5.47 7.98-5.47 1.9 0 3.64.68 5.01 1.8L13.5 15h9V6l-4.1 4.6z"
|
|
4474
|
+
}
|
|
4475
|
+
) }),
|
|
4476
|
+
fullscreen: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx5(
|
|
4477
|
+
"path",
|
|
4478
|
+
{
|
|
4479
|
+
fill: "currentColor",
|
|
4480
|
+
d: "M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"
|
|
4481
|
+
}
|
|
4482
|
+
) }),
|
|
4483
|
+
print: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx5(
|
|
4484
|
+
"path",
|
|
4485
|
+
{
|
|
4486
|
+
fill: "currentColor",
|
|
4487
|
+
d: "M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"
|
|
4488
|
+
}
|
|
4489
|
+
) }),
|
|
4490
|
+
textColor: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx5(
|
|
4491
|
+
"path",
|
|
4492
|
+
{
|
|
4493
|
+
fill: "currentColor",
|
|
4494
|
+
d: "M11 3L5.5 17h2.25l1.12-3h6.25l1.12 3h2.25L13 3h-2zm-1.38 9L12 5.67 14.38 12H9.62z"
|
|
4495
|
+
}
|
|
4496
|
+
) }),
|
|
4497
|
+
backgroundColor: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "16", height: "16", children: /* @__PURE__ */ jsx5(
|
|
4498
|
+
"path",
|
|
4499
|
+
{
|
|
4500
|
+
fill: "currentColor",
|
|
4501
|
+
d: "M16.56 8.94L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.59-.59 1.54 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.58.59-1.53 0-2.12zM5.21 10L10 5.21 14.79 10H5.21zM19 11.5s-2 2.17-2 3.5c0 1.1.9 2 2 2s2-.9 2-2c0-1.33-2-3.5-2-3.5zM2 20h20v4H2v-4z"
|
|
4502
|
+
}
|
|
4503
|
+
) })
|
|
3960
4504
|
};
|
|
3961
4505
|
LexicalToolbar = ({
|
|
3962
4506
|
editor,
|
|
@@ -4225,15 +4769,7 @@ var init_LexicalToolbar = __esm({
|
|
|
4225
4769
|
);
|
|
4226
4770
|
// Blocks
|
|
4227
4771
|
case "blockquote":
|
|
4228
|
-
return /* @__PURE__ */ jsx5(
|
|
4229
|
-
ToolbarButton2,
|
|
4230
|
-
{
|
|
4231
|
-
onClick: formatQuote,
|
|
4232
|
-
title: "Blockquote",
|
|
4233
|
-
children: icons2.blockquote
|
|
4234
|
-
},
|
|
4235
|
-
button
|
|
4236
|
-
);
|
|
4772
|
+
return /* @__PURE__ */ jsx5(ToolbarButton2, { onClick: formatQuote, title: "Blockquote", children: icons2.blockquote }, button);
|
|
4237
4773
|
case "horizontalRule":
|
|
4238
4774
|
return /* @__PURE__ */ jsx5(
|
|
4239
4775
|
ToolbarButton2,
|
|
@@ -4246,45 +4782,45 @@ var init_LexicalToolbar = __esm({
|
|
|
4246
4782
|
);
|
|
4247
4783
|
// Links
|
|
4248
4784
|
case "link":
|
|
4249
|
-
return /* @__PURE__ */ jsxs5(
|
|
4250
|
-
|
|
4251
|
-
ToolbarButton2,
|
|
4252
|
-
{
|
|
4253
|
-
onClick: () => setShowLinkDialog(!showLinkDialog),
|
|
4254
|
-
title: "Insert Link",
|
|
4255
|
-
children: icons2.link
|
|
4256
|
-
}
|
|
4257
|
-
),
|
|
4258
|
-
showLinkDialog && /* @__PURE__ */ jsxs5("div", { className: "rte-builder-toolbar-dropdown-content", children: [
|
|
4259
|
-
/* @__PURE__ */ jsx5(
|
|
4260
|
-
"input",
|
|
4261
|
-
{
|
|
4262
|
-
type: "url",
|
|
4263
|
-
placeholder: "Enter URL...",
|
|
4264
|
-
value: linkUrl,
|
|
4265
|
-
onChange: (e) => setLinkUrl(e.target.value),
|
|
4266
|
-
onKeyDown: (e) => {
|
|
4267
|
-
if (e.key === "Enter") {
|
|
4268
|
-
e.preventDefault();
|
|
4269
|
-
insertLink();
|
|
4270
|
-
}
|
|
4271
|
-
},
|
|
4272
|
-
autoFocus: true
|
|
4273
|
-
}
|
|
4274
|
-
),
|
|
4275
|
-
/* @__PURE__ */ jsx5("button", { onClick: insertLink, children: "Insert" })
|
|
4276
|
-
] })
|
|
4277
|
-
] }, button);
|
|
4278
|
-
case "unlink":
|
|
4279
|
-
return /* @__PURE__ */ jsx5(
|
|
4280
|
-
ToolbarButton2,
|
|
4785
|
+
return /* @__PURE__ */ jsxs5(
|
|
4786
|
+
"div",
|
|
4281
4787
|
{
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
children:
|
|
4788
|
+
className: "rte-builder-toolbar-dropdown",
|
|
4789
|
+
ref: linkDialogRef,
|
|
4790
|
+
children: [
|
|
4791
|
+
/* @__PURE__ */ jsx5(
|
|
4792
|
+
ToolbarButton2,
|
|
4793
|
+
{
|
|
4794
|
+
onClick: () => setShowLinkDialog(!showLinkDialog),
|
|
4795
|
+
title: "Insert Link",
|
|
4796
|
+
children: icons2.link
|
|
4797
|
+
}
|
|
4798
|
+
),
|
|
4799
|
+
showLinkDialog && /* @__PURE__ */ jsxs5("div", { className: "rte-builder-toolbar-dropdown-content", children: [
|
|
4800
|
+
/* @__PURE__ */ jsx5(
|
|
4801
|
+
"input",
|
|
4802
|
+
{
|
|
4803
|
+
type: "url",
|
|
4804
|
+
placeholder: "Enter URL...",
|
|
4805
|
+
value: linkUrl,
|
|
4806
|
+
onChange: (e) => setLinkUrl(e.target.value),
|
|
4807
|
+
onKeyDown: (e) => {
|
|
4808
|
+
if (e.key === "Enter") {
|
|
4809
|
+
e.preventDefault();
|
|
4810
|
+
insertLink();
|
|
4811
|
+
}
|
|
4812
|
+
},
|
|
4813
|
+
autoFocus: true
|
|
4814
|
+
}
|
|
4815
|
+
),
|
|
4816
|
+
/* @__PURE__ */ jsx5("button", { onClick: insertLink, children: "Insert" })
|
|
4817
|
+
] })
|
|
4818
|
+
]
|
|
4285
4819
|
},
|
|
4286
4820
|
button
|
|
4287
4821
|
);
|
|
4822
|
+
case "unlink":
|
|
4823
|
+
return /* @__PURE__ */ jsx5(ToolbarButton2, { onClick: removeLink, title: "Remove Link", children: icons2.unlink }, button);
|
|
4288
4824
|
// Media
|
|
4289
4825
|
case "image":
|
|
4290
4826
|
return /* @__PURE__ */ jsx5(
|
|
@@ -4322,39 +4858,45 @@ var init_LexicalToolbar = __esm({
|
|
|
4322
4858
|
);
|
|
4323
4859
|
// Emoji
|
|
4324
4860
|
case "emoji":
|
|
4325
|
-
return /* @__PURE__ */ jsxs5(
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
),
|
|
4334
|
-
showEmojiPicker && /* @__PURE__ */ jsxs5("div", { className: "rte-builder-emoji-picker", children: [
|
|
4335
|
-
/* @__PURE__ */ jsx5("div", { className: "rte-builder-emoji-categories", children: Object.entries(EMOJI_CATEGORIES).map(([key, category]) => /* @__PURE__ */ jsx5(
|
|
4336
|
-
"button",
|
|
4337
|
-
{
|
|
4338
|
-
className: `rte-builder-emoji-category-btn ${selectedEmojiCategory === key ? "active" : ""}`,
|
|
4339
|
-
onClick: () => setSelectedEmojiCategory(key),
|
|
4340
|
-
title: category.label,
|
|
4341
|
-
children: category.emojis[0]
|
|
4342
|
-
},
|
|
4343
|
-
key
|
|
4344
|
-
)) }),
|
|
4345
|
-
/* @__PURE__ */ jsx5("div", { className: "rte-builder-emoji-grid", children: EMOJI_CATEGORIES[selectedEmojiCategory]?.emojis.map(
|
|
4346
|
-
(emoji, idx) => /* @__PURE__ */ jsx5(
|
|
4347
|
-
"button",
|
|
4861
|
+
return /* @__PURE__ */ jsxs5(
|
|
4862
|
+
"div",
|
|
4863
|
+
{
|
|
4864
|
+
className: "rte-builder-toolbar-dropdown",
|
|
4865
|
+
ref: emojiPickerRef,
|
|
4866
|
+
children: [
|
|
4867
|
+
/* @__PURE__ */ jsx5(
|
|
4868
|
+
ToolbarButton2,
|
|
4348
4869
|
{
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
children: emoji
|
|
4352
|
-
}
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4870
|
+
onClick: () => setShowEmojiPicker(!showEmojiPicker),
|
|
4871
|
+
title: "Insert Emoji",
|
|
4872
|
+
children: icons2.emoji
|
|
4873
|
+
}
|
|
4874
|
+
),
|
|
4875
|
+
showEmojiPicker && /* @__PURE__ */ jsxs5("div", { className: "rte-builder-emoji-picker", children: [
|
|
4876
|
+
/* @__PURE__ */ jsx5("div", { className: "rte-builder-emoji-categories", children: Object.entries(EMOJI_CATEGORIES).map(([key, category]) => /* @__PURE__ */ jsx5(
|
|
4877
|
+
"button",
|
|
4878
|
+
{
|
|
4879
|
+
className: `rte-builder-emoji-category-btn ${selectedEmojiCategory === key ? "active" : ""}`,
|
|
4880
|
+
onClick: () => setSelectedEmojiCategory(key),
|
|
4881
|
+
title: category.label,
|
|
4882
|
+
children: category.emojis[0]
|
|
4883
|
+
},
|
|
4884
|
+
key
|
|
4885
|
+
)) }),
|
|
4886
|
+
/* @__PURE__ */ jsx5("div", { className: "rte-builder-emoji-grid", children: EMOJI_CATEGORIES[selectedEmojiCategory]?.emojis.map((emoji, idx) => /* @__PURE__ */ jsx5(
|
|
4887
|
+
"button",
|
|
4888
|
+
{
|
|
4889
|
+
className: "rte-builder-emoji-btn",
|
|
4890
|
+
onClick: () => insertEmoji(emoji),
|
|
4891
|
+
children: emoji
|
|
4892
|
+
},
|
|
4893
|
+
idx
|
|
4894
|
+
)) })
|
|
4895
|
+
] })
|
|
4896
|
+
]
|
|
4897
|
+
},
|
|
4898
|
+
button
|
|
4899
|
+
);
|
|
4358
4900
|
// Actions
|
|
4359
4901
|
case "undo":
|
|
4360
4902
|
return /* @__PURE__ */ jsx5(
|
|
@@ -5214,12 +5756,7 @@ var DEFAULT_FEATURES = {
|
|
|
5214
5756
|
|
|
5215
5757
|
// src/adapters/tiptap/TipTapAdapter.ts
|
|
5216
5758
|
function checkTipTapAvailable() {
|
|
5217
|
-
|
|
5218
|
-
__require("@tiptap/react");
|
|
5219
|
-
return true;
|
|
5220
|
-
} catch {
|
|
5221
|
-
return false;
|
|
5222
|
-
}
|
|
5759
|
+
return true;
|
|
5223
5760
|
}
|
|
5224
5761
|
var TIPTAP_FEATURES = {
|
|
5225
5762
|
...DEFAULT_FEATURES,
|
|
@@ -5611,28 +6148,28 @@ import { useEditor as useEditor2, EditorContent as EditorContent2 } from "@tipta
|
|
|
5611
6148
|
import { Document as Document2 } from "@tiptap/extension-document";
|
|
5612
6149
|
import { Paragraph as Paragraph2 } from "@tiptap/extension-paragraph";
|
|
5613
6150
|
import { Text as Text3 } from "@tiptap/extension-text";
|
|
5614
|
-
import { Bold as
|
|
5615
|
-
import { Italic as
|
|
5616
|
-
import { Underline as
|
|
6151
|
+
import { Bold as Bold3 } from "@tiptap/extension-bold";
|
|
6152
|
+
import { Italic as Italic3 } from "@tiptap/extension-italic";
|
|
6153
|
+
import { Underline as Underline3 } from "@tiptap/extension-underline";
|
|
5617
6154
|
import { Strike as Strike2 } from "@tiptap/extension-strike";
|
|
5618
|
-
import { Code as
|
|
6155
|
+
import { Code as Code3 } from "@tiptap/extension-code";
|
|
5619
6156
|
import { CodeBlockLowlight as CodeBlockLowlight2 } from "@tiptap/extension-code-block-lowlight";
|
|
5620
|
-
import { Subscript as
|
|
5621
|
-
import { Superscript as
|
|
6157
|
+
import { Subscript as Subscript3 } from "@tiptap/extension-subscript";
|
|
6158
|
+
import { Superscript as Superscript3 } from "@tiptap/extension-superscript";
|
|
5622
6159
|
import { TextStyle as TextStyle2 } from "@tiptap/extension-text-style";
|
|
5623
6160
|
import { FontFamily as FontFamily2 } from "@tiptap/extension-font-family";
|
|
5624
6161
|
import { Color as Color2 } from "@tiptap/extension-color";
|
|
5625
6162
|
import { Highlight as Highlight2 } from "@tiptap/extension-highlight";
|
|
5626
6163
|
import { TextAlign as TextAlign2 } from "@tiptap/extension-text-align";
|
|
5627
|
-
import { Heading as
|
|
6164
|
+
import { Heading as Heading3 } from "@tiptap/extension-heading";
|
|
5628
6165
|
import { BulletList as BulletList2 } from "@tiptap/extension-bullet-list";
|
|
5629
6166
|
import { OrderedList as OrderedList2 } from "@tiptap/extension-ordered-list";
|
|
5630
6167
|
import { ListItem as ListItem2 } from "@tiptap/extension-list-item";
|
|
5631
6168
|
import { Blockquote as Blockquote2 } from "@tiptap/extension-blockquote";
|
|
5632
6169
|
import { HorizontalRule as HorizontalRule2 } from "@tiptap/extension-horizontal-rule";
|
|
5633
|
-
import { Link as
|
|
5634
|
-
import { Image as
|
|
5635
|
-
import { Table as
|
|
6170
|
+
import { Link as Link3 } from "@tiptap/extension-link";
|
|
6171
|
+
import { Image as Image3 } from "@tiptap/extension-image";
|
|
6172
|
+
import { Table as Table3 } from "@tiptap/extension-table";
|
|
5636
6173
|
import { TableRow as TableRow2 } from "@tiptap/extension-table-row";
|
|
5637
6174
|
import { TableCell as TableCell2 } from "@tiptap/extension-table-cell";
|
|
5638
6175
|
import { TableHeader as TableHeader2 } from "@tiptap/extension-table-header";
|
|
@@ -5647,6 +6184,41 @@ import { common as common2, createLowlight as createLowlight2 } from "lowlight";
|
|
|
5647
6184
|
// src/components/Toolbar.tsx
|
|
5648
6185
|
init_Emoji();
|
|
5649
6186
|
import { useState as useState7, useRef as useRef7, useEffect as useEffect7 } from "react";
|
|
6187
|
+
import {
|
|
6188
|
+
Bold as Bold2,
|
|
6189
|
+
Italic as Italic2,
|
|
6190
|
+
Underline as Underline2,
|
|
6191
|
+
Strikethrough,
|
|
6192
|
+
Code as Code2,
|
|
6193
|
+
FileCode,
|
|
6194
|
+
Subscript as Subscript2,
|
|
6195
|
+
Superscript as Superscript2,
|
|
6196
|
+
RemoveFormatting,
|
|
6197
|
+
Type,
|
|
6198
|
+
Highlighter,
|
|
6199
|
+
AlignLeft,
|
|
6200
|
+
AlignCenter,
|
|
6201
|
+
AlignRight,
|
|
6202
|
+
AlignJustify,
|
|
6203
|
+
Indent as Indent2,
|
|
6204
|
+
Outdent,
|
|
6205
|
+
List,
|
|
6206
|
+
ListOrdered,
|
|
6207
|
+
Heading as Heading2,
|
|
6208
|
+
Quote,
|
|
6209
|
+
Minus,
|
|
6210
|
+
Link as Link2,
|
|
6211
|
+
Unlink,
|
|
6212
|
+
Image as Image2,
|
|
6213
|
+
Video as Video2,
|
|
6214
|
+
Table as Table2,
|
|
6215
|
+
Smile,
|
|
6216
|
+
Maximize,
|
|
6217
|
+
Minimize,
|
|
6218
|
+
Printer,
|
|
6219
|
+
Undo,
|
|
6220
|
+
Redo
|
|
6221
|
+
} from "lucide-react";
|
|
5650
6222
|
import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
5651
6223
|
var FONT_FAMILIES2 = [
|
|
5652
6224
|
{ value: "Arial", label: "Arial" },
|
|
@@ -5760,7 +6332,7 @@ var Toolbar = ({
|
|
|
5760
6332
|
onClick: () => editor.chain().focus().toggleBold().run(),
|
|
5761
6333
|
active: editor.isActive("bold"),
|
|
5762
6334
|
title: "Bold (Ctrl+B)",
|
|
5763
|
-
children: /* @__PURE__ */ jsx8(
|
|
6335
|
+
children: /* @__PURE__ */ jsx8(Bold2, { size: 18 })
|
|
5764
6336
|
},
|
|
5765
6337
|
"bold"
|
|
5766
6338
|
);
|
|
@@ -5771,7 +6343,7 @@ var Toolbar = ({
|
|
|
5771
6343
|
onClick: () => editor.chain().focus().toggleItalic().run(),
|
|
5772
6344
|
active: editor.isActive("italic"),
|
|
5773
6345
|
title: "Italic (Ctrl+I)",
|
|
5774
|
-
children: /* @__PURE__ */ jsx8(
|
|
6346
|
+
children: /* @__PURE__ */ jsx8(Italic2, { size: 18 })
|
|
5775
6347
|
},
|
|
5776
6348
|
"italic"
|
|
5777
6349
|
);
|
|
@@ -5782,7 +6354,7 @@ var Toolbar = ({
|
|
|
5782
6354
|
onClick: () => editor.chain().focus().toggleUnderline().run(),
|
|
5783
6355
|
active: editor.isActive("underline"),
|
|
5784
6356
|
title: "Underline (Ctrl+U)",
|
|
5785
|
-
children: /* @__PURE__ */ jsx8(
|
|
6357
|
+
children: /* @__PURE__ */ jsx8(Underline2, { size: 18 })
|
|
5786
6358
|
},
|
|
5787
6359
|
"underline"
|
|
5788
6360
|
);
|
|
@@ -5793,7 +6365,7 @@ var Toolbar = ({
|
|
|
5793
6365
|
onClick: () => editor.chain().focus().toggleStrike().run(),
|
|
5794
6366
|
active: editor.isActive("strike"),
|
|
5795
6367
|
title: "Strikethrough",
|
|
5796
|
-
children: /* @__PURE__ */ jsx8(
|
|
6368
|
+
children: /* @__PURE__ */ jsx8(Strikethrough, { size: 18 })
|
|
5797
6369
|
},
|
|
5798
6370
|
"strike"
|
|
5799
6371
|
);
|
|
@@ -5804,7 +6376,7 @@ var Toolbar = ({
|
|
|
5804
6376
|
onClick: () => editor.chain().focus().toggleCode().run(),
|
|
5805
6377
|
active: editor.isActive("code"),
|
|
5806
6378
|
title: "Inline Code",
|
|
5807
|
-
children:
|
|
6379
|
+
children: /* @__PURE__ */ jsx8(Code2, { size: 18 })
|
|
5808
6380
|
},
|
|
5809
6381
|
"code"
|
|
5810
6382
|
);
|
|
@@ -5815,35 +6387,29 @@ var Toolbar = ({
|
|
|
5815
6387
|
onClick: () => editor.chain().focus().toggleCodeBlock().run(),
|
|
5816
6388
|
active: editor.isActive("codeBlock"),
|
|
5817
6389
|
title: "Code Block",
|
|
5818
|
-
children:
|
|
6390
|
+
children: /* @__PURE__ */ jsx8(FileCode, { size: 18 })
|
|
5819
6391
|
},
|
|
5820
6392
|
"codeBlock"
|
|
5821
6393
|
);
|
|
5822
6394
|
case "subscript":
|
|
5823
|
-
return /* @__PURE__ */
|
|
6395
|
+
return /* @__PURE__ */ jsx8(
|
|
5824
6396
|
ToolbarButton3,
|
|
5825
6397
|
{
|
|
5826
6398
|
onClick: () => editor.chain().focus().toggleSubscript().run(),
|
|
5827
6399
|
active: editor.isActive("subscript"),
|
|
5828
6400
|
title: "Subscript",
|
|
5829
|
-
children:
|
|
5830
|
-
"X",
|
|
5831
|
-
/* @__PURE__ */ jsx8("sub", { children: "2" })
|
|
5832
|
-
]
|
|
6401
|
+
children: /* @__PURE__ */ jsx8(Subscript2, { size: 18 })
|
|
5833
6402
|
},
|
|
5834
6403
|
"subscript"
|
|
5835
6404
|
);
|
|
5836
6405
|
case "superscript":
|
|
5837
|
-
return /* @__PURE__ */
|
|
6406
|
+
return /* @__PURE__ */ jsx8(
|
|
5838
6407
|
ToolbarButton3,
|
|
5839
6408
|
{
|
|
5840
6409
|
onClick: () => editor.chain().focus().toggleSuperscript().run(),
|
|
5841
6410
|
active: editor.isActive("superscript"),
|
|
5842
6411
|
title: "Superscript",
|
|
5843
|
-
children:
|
|
5844
|
-
"X",
|
|
5845
|
-
/* @__PURE__ */ jsx8("sup", { children: "2" })
|
|
5846
|
-
]
|
|
6412
|
+
children: /* @__PURE__ */ jsx8(Superscript2, { size: 18 })
|
|
5847
6413
|
},
|
|
5848
6414
|
"superscript"
|
|
5849
6415
|
);
|
|
@@ -5853,7 +6419,7 @@ var Toolbar = ({
|
|
|
5853
6419
|
{
|
|
5854
6420
|
onClick: () => editor.chain().focus().clearNodes().unsetAllMarks().run(),
|
|
5855
6421
|
title: "Clear Formatting",
|
|
5856
|
-
children:
|
|
6422
|
+
children: /* @__PURE__ */ jsx8(RemoveFormatting, { size: 18 })
|
|
5857
6423
|
},
|
|
5858
6424
|
"clearFormatting"
|
|
5859
6425
|
);
|
|
@@ -5920,7 +6486,7 @@ var Toolbar = ({
|
|
|
5920
6486
|
);
|
|
5921
6487
|
case "textColor":
|
|
5922
6488
|
return /* @__PURE__ */ jsx8("span", { className: "rte-builder-toolbar-color", children: /* @__PURE__ */ jsxs8("label", { title: "Text Color", children: [
|
|
5923
|
-
|
|
6489
|
+
/* @__PURE__ */ jsx8(Type, { size: 18 }),
|
|
5924
6490
|
/* @__PURE__ */ jsx8(
|
|
5925
6491
|
"input",
|
|
5926
6492
|
{
|
|
@@ -5932,7 +6498,7 @@ var Toolbar = ({
|
|
|
5932
6498
|
] }) }, "textColor");
|
|
5933
6499
|
case "backgroundColor":
|
|
5934
6500
|
return /* @__PURE__ */ jsx8("span", { className: "rte-builder-toolbar-color", children: /* @__PURE__ */ jsxs8("label", { title: "Background Color", children: [
|
|
5935
|
-
|
|
6501
|
+
/* @__PURE__ */ jsx8(Highlighter, { size: 18 }),
|
|
5936
6502
|
/* @__PURE__ */ jsx8(
|
|
5937
6503
|
"input",
|
|
5938
6504
|
{
|
|
@@ -5949,7 +6515,7 @@ var Toolbar = ({
|
|
|
5949
6515
|
onClick: () => editor.chain().focus().setTextAlign("left").run(),
|
|
5950
6516
|
active: editor.isActive({ textAlign: "left" }),
|
|
5951
6517
|
title: "Align Left",
|
|
5952
|
-
children:
|
|
6518
|
+
children: /* @__PURE__ */ jsx8(AlignLeft, { size: 18 })
|
|
5953
6519
|
},
|
|
5954
6520
|
"alignLeft"
|
|
5955
6521
|
);
|
|
@@ -5960,7 +6526,7 @@ var Toolbar = ({
|
|
|
5960
6526
|
onClick: () => editor.chain().focus().setTextAlign("center").run(),
|
|
5961
6527
|
active: editor.isActive({ textAlign: "center" }),
|
|
5962
6528
|
title: "Align Center",
|
|
5963
|
-
children:
|
|
6529
|
+
children: /* @__PURE__ */ jsx8(AlignCenter, { size: 18 })
|
|
5964
6530
|
},
|
|
5965
6531
|
"alignCenter"
|
|
5966
6532
|
);
|
|
@@ -5971,7 +6537,7 @@ var Toolbar = ({
|
|
|
5971
6537
|
onClick: () => editor.chain().focus().setTextAlign("right").run(),
|
|
5972
6538
|
active: editor.isActive({ textAlign: "right" }),
|
|
5973
6539
|
title: "Align Right",
|
|
5974
|
-
children:
|
|
6540
|
+
children: /* @__PURE__ */ jsx8(AlignRight, { size: 18 })
|
|
5975
6541
|
},
|
|
5976
6542
|
"alignRight"
|
|
5977
6543
|
);
|
|
@@ -5982,7 +6548,7 @@ var Toolbar = ({
|
|
|
5982
6548
|
onClick: () => editor.chain().focus().setTextAlign("justify").run(),
|
|
5983
6549
|
active: editor.isActive({ textAlign: "justify" }),
|
|
5984
6550
|
title: "Justify",
|
|
5985
|
-
children:
|
|
6551
|
+
children: /* @__PURE__ */ jsx8(AlignJustify, { size: 18 })
|
|
5986
6552
|
},
|
|
5987
6553
|
"alignJustify"
|
|
5988
6554
|
);
|
|
@@ -5992,7 +6558,7 @@ var Toolbar = ({
|
|
|
5992
6558
|
{
|
|
5993
6559
|
onClick: () => editor.chain().focus().indent().run(),
|
|
5994
6560
|
title: "Indent (Tab)",
|
|
5995
|
-
children:
|
|
6561
|
+
children: /* @__PURE__ */ jsx8(Indent2, { size: 18 })
|
|
5996
6562
|
},
|
|
5997
6563
|
"indent"
|
|
5998
6564
|
);
|
|
@@ -6002,7 +6568,7 @@ var Toolbar = ({
|
|
|
6002
6568
|
{
|
|
6003
6569
|
onClick: () => editor.chain().focus().outdent().run(),
|
|
6004
6570
|
title: "Outdent (Shift+Tab)",
|
|
6005
|
-
children:
|
|
6571
|
+
children: /* @__PURE__ */ jsx8(Outdent, { size: 18 })
|
|
6006
6572
|
},
|
|
6007
6573
|
"outdent"
|
|
6008
6574
|
);
|
|
@@ -6013,7 +6579,7 @@ var Toolbar = ({
|
|
|
6013
6579
|
onClick: () => editor.chain().focus().toggleBulletList().run(),
|
|
6014
6580
|
active: editor.isActive("bulletList"),
|
|
6015
6581
|
title: "Bullet List",
|
|
6016
|
-
children:
|
|
6582
|
+
children: /* @__PURE__ */ jsx8(List, { size: 18 })
|
|
6017
6583
|
},
|
|
6018
6584
|
"bulletList"
|
|
6019
6585
|
);
|
|
@@ -6024,7 +6590,7 @@ var Toolbar = ({
|
|
|
6024
6590
|
onClick: () => editor.chain().focus().toggleOrderedList().run(),
|
|
6025
6591
|
active: editor.isActive("orderedList"),
|
|
6026
6592
|
title: "Numbered List",
|
|
6027
|
-
children:
|
|
6593
|
+
children: /* @__PURE__ */ jsx8(ListOrdered, { size: 18 })
|
|
6028
6594
|
},
|
|
6029
6595
|
"orderedList"
|
|
6030
6596
|
);
|
|
@@ -6035,16 +6601,16 @@ var Toolbar = ({
|
|
|
6035
6601
|
case "heading5":
|
|
6036
6602
|
case "heading6":
|
|
6037
6603
|
const level = parseInt(button.replace("heading", ""));
|
|
6038
|
-
return /* @__PURE__ */
|
|
6604
|
+
return /* @__PURE__ */ jsx8(
|
|
6039
6605
|
ToolbarButton3,
|
|
6040
6606
|
{
|
|
6041
6607
|
onClick: () => editor.chain().focus().toggleHeading({ level }).run(),
|
|
6042
6608
|
active: editor.isActive("heading", { level }),
|
|
6043
6609
|
title: `Heading ${level}`,
|
|
6044
|
-
children: [
|
|
6045
|
-
|
|
6046
|
-
level
|
|
6047
|
-
]
|
|
6610
|
+
children: /* @__PURE__ */ jsxs8("span", { style: { display: "flex", alignItems: "center", gap: "2px" }, children: [
|
|
6611
|
+
/* @__PURE__ */ jsx8(Heading2, { size: 18 }),
|
|
6612
|
+
/* @__PURE__ */ jsx8("span", { style: { fontSize: "11px", fontWeight: "bold" }, children: level })
|
|
6613
|
+
] })
|
|
6048
6614
|
},
|
|
6049
6615
|
button
|
|
6050
6616
|
);
|
|
@@ -6055,7 +6621,7 @@ var Toolbar = ({
|
|
|
6055
6621
|
onClick: () => editor.chain().focus().toggleBlockquote().run(),
|
|
6056
6622
|
active: editor.isActive("blockquote"),
|
|
6057
6623
|
title: "Blockquote",
|
|
6058
|
-
children:
|
|
6624
|
+
children: /* @__PURE__ */ jsx8(Quote, { size: 18 })
|
|
6059
6625
|
},
|
|
6060
6626
|
"blockquote"
|
|
6061
6627
|
);
|
|
@@ -6065,7 +6631,7 @@ var Toolbar = ({
|
|
|
6065
6631
|
{
|
|
6066
6632
|
onClick: () => editor.chain().focus().setHorizontalRule().run(),
|
|
6067
6633
|
title: "Horizontal Rule",
|
|
6068
|
-
children:
|
|
6634
|
+
children: /* @__PURE__ */ jsx8(Minus, { size: 18 })
|
|
6069
6635
|
},
|
|
6070
6636
|
"horizontalRule"
|
|
6071
6637
|
);
|
|
@@ -6081,7 +6647,7 @@ var Toolbar = ({
|
|
|
6081
6647
|
},
|
|
6082
6648
|
active: editor.isActive("link"),
|
|
6083
6649
|
title: "Insert Link",
|
|
6084
|
-
children:
|
|
6650
|
+
children: /* @__PURE__ */ jsx8(Link2, { size: 18 })
|
|
6085
6651
|
},
|
|
6086
6652
|
"link"
|
|
6087
6653
|
);
|
|
@@ -6092,7 +6658,7 @@ var Toolbar = ({
|
|
|
6092
6658
|
onClick: () => editor.chain().focus().unsetLink().run(),
|
|
6093
6659
|
disabled: !editor.isActive("link"),
|
|
6094
6660
|
title: "Remove Link",
|
|
6095
|
-
children:
|
|
6661
|
+
children: /* @__PURE__ */ jsx8(Unlink, { size: 18 })
|
|
6096
6662
|
},
|
|
6097
6663
|
"unlink"
|
|
6098
6664
|
);
|
|
@@ -6111,7 +6677,7 @@ var Toolbar = ({
|
|
|
6111
6677
|
}
|
|
6112
6678
|
},
|
|
6113
6679
|
title: "Insert Image",
|
|
6114
|
-
children:
|
|
6680
|
+
children: /* @__PURE__ */ jsx8(Image2, { size: 18 })
|
|
6115
6681
|
},
|
|
6116
6682
|
"image"
|
|
6117
6683
|
);
|
|
@@ -6130,7 +6696,7 @@ var Toolbar = ({
|
|
|
6130
6696
|
}
|
|
6131
6697
|
},
|
|
6132
6698
|
title: "Insert Video",
|
|
6133
|
-
children:
|
|
6699
|
+
children: /* @__PURE__ */ jsx8(Video2, { size: 18 })
|
|
6134
6700
|
},
|
|
6135
6701
|
"video"
|
|
6136
6702
|
);
|
|
@@ -6140,7 +6706,7 @@ var Toolbar = ({
|
|
|
6140
6706
|
{
|
|
6141
6707
|
onClick: () => editor.chain().focus().insertTable({ rows: 3, cols: 3, withHeaderRow: true }).run(),
|
|
6142
6708
|
title: "Insert Table",
|
|
6143
|
-
children:
|
|
6709
|
+
children: /* @__PURE__ */ jsx8(Table2, { size: 18 })
|
|
6144
6710
|
},
|
|
6145
6711
|
"table"
|
|
6146
6712
|
);
|
|
@@ -6153,7 +6719,7 @@ var Toolbar = ({
|
|
|
6153
6719
|
onClick: () => setShowEmojiPicker(!showEmojiPicker),
|
|
6154
6720
|
active: showEmojiPicker,
|
|
6155
6721
|
title: "Insert Emoji",
|
|
6156
|
-
children:
|
|
6722
|
+
children: /* @__PURE__ */ jsx8(Smile, { size: 18 })
|
|
6157
6723
|
}
|
|
6158
6724
|
),
|
|
6159
6725
|
showEmojiPicker && /* @__PURE__ */ jsx8(
|
|
@@ -6172,7 +6738,7 @@ var Toolbar = ({
|
|
|
6172
6738
|
onClick: () => editor.chain().focus().toggleFullscreen().run(),
|
|
6173
6739
|
active: isFullscreen,
|
|
6174
6740
|
title: isFullscreen ? "Exit Fullscreen (Esc)" : "Fullscreen (Ctrl+Shift+F)",
|
|
6175
|
-
children: isFullscreen ?
|
|
6741
|
+
children: isFullscreen ? /* @__PURE__ */ jsx8(Minimize, { size: 18 }) : /* @__PURE__ */ jsx8(Maximize, { size: 18 })
|
|
6176
6742
|
},
|
|
6177
6743
|
"fullscreen"
|
|
6178
6744
|
);
|
|
@@ -6182,7 +6748,7 @@ var Toolbar = ({
|
|
|
6182
6748
|
{
|
|
6183
6749
|
onClick: () => editor.chain().focus().print().run(),
|
|
6184
6750
|
title: "Print (Ctrl+P)",
|
|
6185
|
-
children:
|
|
6751
|
+
children: /* @__PURE__ */ jsx8(Printer, { size: 18 })
|
|
6186
6752
|
},
|
|
6187
6753
|
"print"
|
|
6188
6754
|
);
|
|
@@ -6193,7 +6759,7 @@ var Toolbar = ({
|
|
|
6193
6759
|
onClick: () => editor.chain().focus().undo().run(),
|
|
6194
6760
|
disabled: !editor.can().undo(),
|
|
6195
6761
|
title: "Undo (Ctrl+Z)",
|
|
6196
|
-
children:
|
|
6762
|
+
children: /* @__PURE__ */ jsx8(Undo, { size: 18 })
|
|
6197
6763
|
},
|
|
6198
6764
|
"undo"
|
|
6199
6765
|
);
|
|
@@ -6204,7 +6770,7 @@ var Toolbar = ({
|
|
|
6204
6770
|
onClick: () => editor.chain().focus().redo().run(),
|
|
6205
6771
|
disabled: !editor.can().redo(),
|
|
6206
6772
|
title: "Redo (Ctrl+Y)",
|
|
6207
|
-
children:
|
|
6773
|
+
children: /* @__PURE__ */ jsx8(Redo, { size: 18 })
|
|
6208
6774
|
},
|
|
6209
6775
|
"redo"
|
|
6210
6776
|
);
|
|
@@ -6345,19 +6911,19 @@ var RichTextEditor = forwardRef5(
|
|
|
6345
6911
|
Document2,
|
|
6346
6912
|
Paragraph2,
|
|
6347
6913
|
Text3,
|
|
6348
|
-
|
|
6349
|
-
|
|
6350
|
-
|
|
6914
|
+
Bold3,
|
|
6915
|
+
Italic3,
|
|
6916
|
+
Underline3,
|
|
6351
6917
|
Strike2,
|
|
6352
|
-
|
|
6918
|
+
Code3,
|
|
6353
6919
|
enableCodeHighlight ? CodeBlockLowlight2.configure({
|
|
6354
6920
|
lowlight: lowlight2,
|
|
6355
6921
|
defaultLanguage: defaultCodeLanguage
|
|
6356
6922
|
}) : CodeBlockLowlight2.configure({
|
|
6357
6923
|
lowlight: null
|
|
6358
6924
|
}),
|
|
6359
|
-
|
|
6360
|
-
|
|
6925
|
+
Subscript3,
|
|
6926
|
+
Superscript3,
|
|
6361
6927
|
TextStyle2,
|
|
6362
6928
|
FontFamily2,
|
|
6363
6929
|
FontSize,
|
|
@@ -6367,7 +6933,7 @@ var RichTextEditor = forwardRef5(
|
|
|
6367
6933
|
TextAlign2.configure({
|
|
6368
6934
|
types: ["heading", "paragraph"]
|
|
6369
6935
|
}),
|
|
6370
|
-
|
|
6936
|
+
Heading3.configure({
|
|
6371
6937
|
levels: [1, 2, 3, 4, 5, 6]
|
|
6372
6938
|
}),
|
|
6373
6939
|
BulletList2,
|
|
@@ -6375,19 +6941,19 @@ var RichTextEditor = forwardRef5(
|
|
|
6375
6941
|
ListItem2,
|
|
6376
6942
|
Blockquote2,
|
|
6377
6943
|
HorizontalRule2,
|
|
6378
|
-
|
|
6944
|
+
Link3.configure({
|
|
6379
6945
|
openOnClick: false,
|
|
6380
6946
|
HTMLAttributes: {
|
|
6381
6947
|
target: "_blank",
|
|
6382
6948
|
rel: "noopener noreferrer"
|
|
6383
6949
|
}
|
|
6384
6950
|
}),
|
|
6385
|
-
|
|
6951
|
+
Image3.configure({
|
|
6386
6952
|
inline: false,
|
|
6387
6953
|
allowBase64: true
|
|
6388
6954
|
}),
|
|
6389
6955
|
Video,
|
|
6390
|
-
|
|
6956
|
+
Table3.configure({
|
|
6391
6957
|
resizable: true
|
|
6392
6958
|
}),
|
|
6393
6959
|
TableRow2,
|