fix: misssing part of paid plugin configuration
This commit is contained in:
@@ -68,7 +68,6 @@ export const plugins = listKeyStore([
|
||||
'imagetools',
|
||||
'quickbars',
|
||||
'a11ychecker',
|
||||
'a11ycheckerCss',
|
||||
'powerpaste',
|
||||
]);
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import {
|
||||
useCallback,
|
||||
useEffect,
|
||||
} from 'react';
|
||||
import { a11ycheckerCss } from 'frontend-components-tinymce-advanced-plugins';
|
||||
import tinyMCEStyles from '../../data/constants/tinyMCEStyles';
|
||||
import { StrictDict } from '../../utils';
|
||||
import pluginConfig from './pluginConfig';
|
||||
@@ -250,7 +251,7 @@ export const editorConfig = ({
|
||||
...config,
|
||||
skin: false,
|
||||
content_css: false,
|
||||
content_style: tinyMCEStyles,
|
||||
content_style: tinyMCEStyles + a11ycheckerCss,
|
||||
min_height: minHeight,
|
||||
contextmenu: 'link table',
|
||||
document_base_url: lmsEndpointUrl,
|
||||
|
||||
@@ -31,6 +31,8 @@ const pluginConfig = ({ isLibrary, placeholder, editorType }) => {
|
||||
image,
|
||||
imageTools,
|
||||
quickToolbar,
|
||||
plugins.a11ychecker,
|
||||
plugins.powerpaste,
|
||||
].join(' '),
|
||||
menubar: false,
|
||||
toolbar: toolbar ? mapToolbars([
|
||||
@@ -52,8 +54,7 @@ const pluginConfig = ({ isLibrary, placeholder, editorType }) => {
|
||||
],
|
||||
[imageUploadButton, buttons.link, buttons.unlink, buttons.blockQuote, buttons.codeBlock],
|
||||
[buttons.table, buttons.emoticons, buttons.charmap, buttons.hr],
|
||||
[buttons.removeFormat, codeButton],
|
||||
[buttons.a11ycheck],
|
||||
[buttons.removeFormat, codeButton, buttons.a11ycheck],
|
||||
]) : false,
|
||||
imageToolbar: mapToolbars([
|
||||
// [buttons.rotate.left, buttons.rotate.right],
|
||||
@@ -70,7 +71,7 @@ const pluginConfig = ({ isLibrary, placeholder, editorType }) => {
|
||||
buttons.numlist,
|
||||
],
|
||||
[imageUploadButton, buttons.blockQuote, buttons.codeBlock],
|
||||
[buttons.table, buttons.emoticons, buttons.charmap, buttons.removeFormat],
|
||||
[buttons.table, buttons.emoticons, buttons.charmap, buttons.removeFormat, buttons.a11ycheck],
|
||||
]),
|
||||
quickbarsSelectionToolbar: toolbar ? false : mapToolbars([
|
||||
[buttons.undo, buttons.redo],
|
||||
@@ -82,7 +83,7 @@ const pluginConfig = ({ isLibrary, placeholder, editorType }) => {
|
||||
buttons.numlist,
|
||||
],
|
||||
[imageUploadButton, buttons.blockQuote, buttons.codeBlock],
|
||||
[buttons.table, buttons.emoticons, buttons.charmap, buttons.removeFormat],
|
||||
[buttons.table, buttons.emoticons, buttons.charmap, buttons.removeFormat, buttons.a11ycheck],
|
||||
]),
|
||||
config: {
|
||||
branding: false,
|
||||
@@ -97,6 +98,10 @@ const pluginConfig = ({ isLibrary, placeholder, editorType }) => {
|
||||
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,
|
||||
powerpaste_allow_local_images: true,
|
||||
powerpaste_word_import: 'prompt',
|
||||
powerpaste_html_import: 'prompt',
|
||||
powerpaste_googledoc_import: 'prompt',
|
||||
},
|
||||
})
|
||||
);
|
||||
|
||||
@@ -154,4 +154,6 @@ jest.mock('react-redux', () => {
|
||||
});
|
||||
|
||||
// Mock the plugins repo so jest will stop complaining about ES6 syntax
|
||||
jest.mock('frontend-components-tinymce-advanced-plugins', () => {});
|
||||
jest.mock('frontend-components-tinymce-advanced-plugins', () => ({
|
||||
a11ycheckerCss: '',
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user