From 990e35bdc2e31b69e88e9fe899f58bdf117f0a40 Mon Sep 17 00:00:00 2001 From: Kristin Aoki <42981026+KristinAoki@users.noreply.github.com> Date: Thu, 12 Jan 2023 15:30:06 -0500 Subject: [PATCH] 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. --- src/editors/containers/ProblemEditor/hooks.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/editors/containers/ProblemEditor/hooks.js b/src/editors/containers/ProblemEditor/hooks.js index cb0a539dd..fea936b0c 100644 --- a/src/editors/containers/ProblemEditor/hooks.js +++ b/src/editors/containers/ProblemEditor/hooks.js @@ -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);