Skip to content

Commit a22a260

Browse files
khudymKyrylo Hudym-Levkovych
andauthored
feat: remove offset when stuio header exists (#491)
Co-authored-by: Kyrylo Hudym-Levkovych <[email protected]>
1 parent b6ff623 commit a22a260

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/editors/sharedComponents/TinyMceWidget/pluginConfig.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const pluginConfig = ({ isLibrary, placeholder, editorType }) => {
1515
const inline = editorType === 'expandable';
1616
const toolbar = editorType !== 'expandable';
1717
const defaultFormat = (editorType === 'question' || editorType === 'expandable') ? 'div' : 'p';
18+
const hasStudioHeader = document.querySelector('.studio-header');
1819

1920
return (
2021
StrictDict({
@@ -92,7 +93,7 @@ const pluginConfig = ({ isLibrary, placeholder, editorType }) => {
9293
menubar: false,
9394
toolbar_mode: 'sliding',
9495
toolbar_sticky: true,
95-
toolbar_sticky_offset: 76,
96+
toolbar_sticky_offset: hasStudioHeader ? 0 : 76,
9697
relative_urls: true,
9798
convert_urls: false,
9899
placeholder,

0 commit comments

Comments
 (0)