- { configuration.showSave &&
+ { configuration.toolbar.showSave &&
}
- { configuration.showUndoRedo && <>
+ { configuration.toolbar.showUndoRedo && <>
> }
- { configuration.showBlockFormat && <>
+ { configuration.toolbar.showBlockFormat && <>
activeEditor.dispatchCommand(FORMAT_TEXT_COMMAND, "bold")} icon={} />
activeEditor.dispatchCommand(FORMAT_TEXT_COMMAND, "italic")} icon={} />
activeEditor.dispatchCommand(FORMAT_TEXT_COMMAND, "underline")} icon={} />
- { configuration.showExtraFormat && <>
+ { configuration.toolbar.showExtraFormat && <>
activeEditor.dispatchCommand(FORMAT_TEXT_COMMAND, "strikethrough")} icon={} />
activeEditor.dispatchCommand(FORMAT_TEXT_COMMAND, "subscript")} icon={} />
activeEditor.dispatchCommand(FORMAT_TEXT_COMMAND, "superscript")} icon={} />
> }
- { configuration.showInsertLink && } />}
- { configuration.showFontFormat && <>
+ { configuration.toolbar.showInsertLink && } />}
+ { configuration.toolbar.showFontFormat && <>
-
-
+
+
> }
- { configuration.showAlignment && <>> }
- { configuration.showInsert && <>> }
+ { configuration.toolbar.showAlignment && <>> }
+ { configuration.toolbar.showInsert && <>> }
+ { configuration.spellchecker.enabled && <>
+
+
+ >
+ }
);
};
diff --git a/src/plugins/toolsDropDown.js b/src/plugins/toolsDropDown.js
new file mode 100644
index 0000000..ed089f5
--- /dev/null
+++ b/src/plugins/toolsDropDown.js
@@ -0,0 +1,43 @@
+import React, { Fragment } from 'react';
+
+import { AUTO_CORRECT_COMMAND, SPELLCHECK_COMMAND, PUNCTUATION_CORRECT_COMMAND } from '../commands/spellCheckCommand';
+
+// 3rd party
+import { Button, Dropdown, Space, Tooltip } from "antd";
+// local import
+import Icons from "../icons";
+
+// --------------------------------------
+
+function ToolsDropDown({
+ editor,
+ disabled = false,
+ locale
+ }) {
+ const items = [{
+ onClick: () => editor.dispatchCommand(PUNCTUATION_CORRECT_COMMAND),
+ label: locale.resources.punctuation,
+ icon: