Skip to content

Commit

Permalink
feat: remove offset when stuio header exists (#491)
Browse files Browse the repository at this point in the history
Co-authored-by: Kyrylo Hudym-Levkovych <[email protected]>
  • Loading branch information
khudym and Kyrylo Hudym-Levkovych authored Jul 10, 2024
1 parent b6ff623 commit a22a260
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/editors/sharedComponents/TinyMceWidget/pluginConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit a22a260

Please sign in to comment.