Skip to content
Open
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
33 changes: 27 additions & 6 deletions docs-src/tutorials/cms.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,32 @@ So to change the toolbar you can pass `modules.toolbar` option:
```
content: {
type: 'richtext',
custom: {
modules: {
toolbar: [['bold', 'italic'], ['link', 'image']],
},
},
props: {
quill: {
theme: 'bubble',
modules: {
toolbar: [
['bold', 'italic', 'underline', 'strike'], // toggled buttons
['blockquote', 'code-block'],

[{ 'header': 1 }, { 'header': 2 }], // custom button values
[{ 'list': 'ordered'}, { 'list': 'bullet' }],
[{ 'script': 'sub'}, { 'script': 'super' }], // superscript/subscript
[{ 'indent': '-1'}, { 'indent': '+1' }], // outdent/indent
[{ 'direction': 'rtl' }], // text direction

[{ 'size': ['small', false, 'large', 'huge'] }], // custom dropdown
[{ 'header': [1, 2, 3, 4, 5, 6, false] }],

[{ 'color': [] }, { 'background': [] }], // dropdown with defaults from theme
[{ 'font': [] }],
[{ 'align': [] }],

['clean'] // remove formatting button
]
}
}
}
},
```

Expand All @@ -66,4 +87,4 @@ custom: {

because the `link` function cannot be stringified.

To bypass this restriction you will have to write your Edit Component. You can use [This Example](https://github.com/SoftwareBrothers/adminjs/blob/master/src/frontend/components/property-type/richtext/edit.tsx) as a starting point.
To bypass this restriction you will have to write your Edit Component. You can use [This Example](https://github.com/SoftwareBrothers/adminjs/blob/master/src/frontend/components/property-type/richtext/edit.tsx) as a starting point.