feat: tinyMCE formatting and parsing (#311)

This commit is contained in:
Raymond Zhou
2023-04-21 08:42:10 -07:00
committed by GitHub
parent 802d328f4a
commit 2a5f6795d3
3 changed files with 22 additions and 1 deletions

View File

@@ -14,6 +14,7 @@ const pluginConfig = ({ isLibrary, placeholder, editorType }) => {
const quickToolbar = editorType === 'expandable' ? plugins.quickbars : '';
const inline = editorType === 'expandable';
const toolbar = editorType !== 'expandable';
const defaultFormat = (editorType === 'question' || editorType === 'expandable') ? 'div' : 'p';
return (
StrictDict({
@@ -93,6 +94,8 @@ const pluginConfig = ({ isLibrary, placeholder, editorType }) => {
convert_urls: false,
placeholder,
inline,
block_formats: 'Header 1=h1;Header 2=h2;Header 3=h3;Header 4=h4;Header 5=h5;Header 6=h6;Div=div;Paragraph=p;Preformatted=pre',
forced_root_block: defaultFormat,
},
})
);