From ccbe859705b66c6799a7dbba806cd428a9f49cbd Mon Sep 17 00:00:00 2001 From: Kyrylo Hudym-Levkovych Date: Thu, 4 Jul 2024 02:14:18 +0300 Subject: [PATCH] feat: remove offset when stuio header exists --- src/editors/sharedComponents/TinyMceWidget/pluginConfig.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/editors/sharedComponents/TinyMceWidget/pluginConfig.js b/src/editors/sharedComponents/TinyMceWidget/pluginConfig.js index 61386de47..7d7120dc2 100644 --- a/src/editors/sharedComponents/TinyMceWidget/pluginConfig.js +++ b/src/editors/sharedComponents/TinyMceWidget/pluginConfig.js @@ -15,6 +15,7 @@ const pluginConfig = ({ isLibrary, placeholder, editorType }) => { const inline = editorType === 'expandable'; const toolbar = editorType !== 'expandable'; const defaultFormat = (editorType === 'question' || editorType === 'expandable') ? 'div' : 'p'; + const hasStudioHeader = document.querySelector('.studio-header'); return ( StrictDict({ @@ -92,7 +93,7 @@ const pluginConfig = ({ isLibrary, placeholder, editorType }) => { menubar: false, toolbar_mode: 'sliding', toolbar_sticky: true, - toolbar_sticky_offset: 76, + toolbar_sticky_offset: hasStudioHeader ? 0 : 76, relative_urls: true, convert_urls: false, placeholder,