@sethumadhavan004/ink-editor 0.0.1 → 0.0.2
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.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +8 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2598,13 +2598,16 @@ function InkEditor({
|
|
|
2598
2598
|
pageSize = "A4",
|
|
2599
2599
|
onChange,
|
|
2600
2600
|
theme = "parchment",
|
|
2601
|
-
toolbar = DEFAULT_TOOLBAR
|
|
2601
|
+
toolbar = DEFAULT_TOOLBAR,
|
|
2602
|
+
initialFont = "cursive",
|
|
2603
|
+
initialColors
|
|
2602
2604
|
}) {
|
|
2603
2605
|
const [ruled, setRuled] = useState2(false);
|
|
2604
|
-
const [font, setFont] = useState2(
|
|
2605
|
-
const [colors, setColors] = useState2(
|
|
2606
|
-
theme === "minimal" ? MINIMAL_DEFAULTS : PARCHMENT_DEFAULTS
|
|
2607
|
-
|
|
2606
|
+
const [font, setFont] = useState2(initialFont);
|
|
2607
|
+
const [colors, setColors] = useState2({
|
|
2608
|
+
...theme === "minimal" ? MINIMAL_DEFAULTS : PARCHMENT_DEFAULTS,
|
|
2609
|
+
...initialColors
|
|
2610
|
+
});
|
|
2608
2611
|
const editor = useEditor({
|
|
2609
2612
|
extensions: [
|
|
2610
2613
|
StarterKit,
|