feat: remove question box branding + menu (#192)

This PR address the console.log errors from the question box tinyMCE, removing the tinyMCE branding and menu.
This commit is contained in:
Kristin Aoki
2023-01-12 15:30:06 -05:00
committed by GitHub
parent 2a9851544e
commit 990e35bdc2

View File

@@ -2,6 +2,7 @@ import {
useRef, useCallback, useState, useEffect,
} from 'react';
import { ProblemTypeKeys } from '../../data/constants/problem';
import tinyMCEStyles from '../../data/constants/tinyMCEStyles';
import { StrictDict } from '../../utils';
import * as module from './hooks';
@@ -19,6 +20,13 @@ export const problemEditorConfig = ({
setEditorRef(editor);
},
initialValue: question || '',
init: {
skin: false,
content_css: false,
content_style: tinyMCEStyles,
menubar: false,
branding: false,
},
onFocusOut: () => {
const content = editorRef.current.getContent();
updateQuestion(content);