From a22a260e27af76d2c717c7ff70b086e126c4a24f Mon Sep 17 00:00:00 2001 From: Kyr <40792129+khudym@users.noreply.github.com> Date: Wed, 10 Jul 2024 21:35:25 +0300 Subject: [PATCH] feat: remove offset when stuio header exists (#491) Co-authored-by: Kyrylo Hudym-Levkovych --- 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,