diff --git a/docs-src/tutorials/cms.md b/docs-src/tutorials/cms.md index 1ffe7beb..b443b4a5 100644 --- a/docs-src/tutorials/cms.md +++ b/docs-src/tutorials/cms.md @@ -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 + ] + } + } + } }, ``` @@ -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. \ No newline at end of file +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.