Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document default toolbarConfig #446

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ render() {

```

When `toolbarConfig` is not specified, the Defaults are loaded from [`EditorToolbarConfig.js`](./src/lib/EditorToolbarConfig.js)

## Motivation

In short, this is a modern approach to rich text editing built on a battle-hardened open-source framework and, importantly, we do not store document state in the DOM, eliminating entire classes of common "WYSIWYG" problems.
Expand Down
4 changes: 2 additions & 2 deletions src/lib/EditorToolbarConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ export const BLOCK_TYPE_BUTTONS: StyleConfigList = [
{label: 'Blockquote', style: 'blockquote'},
];

let EditorToolbarConfig: ToolbarConfig = {
let DefaultToolbarConfig: ToolbarConfig = {
display: ['INLINE_STYLE_BUTTONS', 'BLOCK_ALIGNMENT_BUTTONS', 'BLOCK_TYPE_BUTTONS', 'LINK_BUTTONS', 'IMAGE_BUTTON', 'BLOCK_TYPE_DROPDOWN', 'HISTORY_BUTTONS'],
INLINE_STYLE_BUTTONS,
BLOCK_ALIGNMENT_BUTTONS,
BLOCK_TYPE_DROPDOWN,
BLOCK_TYPE_BUTTONS,
};

export default EditorToolbarConfig;
export default DefaultToolbarConfig