diff --git a/services/web/app/coffee/Features/Project/ProjectController.coffee b/services/web/app/coffee/Features/Project/ProjectController.coffee index cd3b3d1905..e95d208900 100644 --- a/services/web/app/coffee/Features/Project/ProjectController.coffee +++ b/services/web/app/coffee/Features/Project/ProjectController.coffee @@ -301,6 +301,7 @@ module.exports = ProjectController = themes: THEME_LIST maxDocLength: Settings.max_doc_length useV2History: !!project.overleaf?.history?.display + showRichText: req.query.rt == 'true' timer.done() _buildProjectList: (allProjects, v1Projects = [])-> diff --git a/services/web/app/coffee/infrastructure/Features.coffee b/services/web/app/coffee/infrastructure/Features.coffee index 5dfe73f05f..519cfda6da 100644 --- a/services/web/app/coffee/infrastructure/Features.coffee +++ b/services/web/app/coffee/infrastructure/Features.coffee @@ -14,8 +14,6 @@ module.exports = Features = return Settings.enableGithubSync when 'v1-return-message' return Settings.accountMerge? and Settings.overleaf? - when 'rich-text' - return Settings.showRichText when 'custom-togglers' return Settings.overleaf? else diff --git a/services/web/app/views/project/editor/editor.pug b/services/web/app/views/project/editor/editor.pug index 2b42cda965..b1570fa55d 100644 --- a/services/web/app/views/project/editor/editor.pug +++ b/services/web/app/views/project/editor/editor.pug @@ -39,6 +39,7 @@ div.full-size( ace-editor="editor", ng-if="!editor.richText", ng-show="!!editor.sharejs_doc && !editor.opening", + style=showRichText ? "top: 40px" : "", theme="settings.theme", keybindings="settings.mode", font-size="settings.fontSize", diff --git a/services/web/public/stylesheets/_style_includes.less b/services/web/public/stylesheets/_style_includes.less index de6c4ff7fe..7f6070e69c 100644 --- a/services/web/public/stylesheets/_style_includes.less +++ b/services/web/public/stylesheets/_style_includes.less @@ -84,8 +84,4 @@ @import "../js/libs/pdfListView/TextLayer.css"; @import "../js/libs/pdfListView/AnnotationsLayer.css"; @import "../js/libs/pdfListView/HighlightsLayer.css"; - -// CodeMirror -& when (@show-rich-text) { - @import "vendor/codemirror.css"; -} +@import "vendor/codemirror.css"; diff --git a/services/web/public/stylesheets/app/editor.less b/services/web/public/stylesheets/app/editor.less index 9a8bdc5594..6350a00c24 100644 --- a/services/web/public/stylesheets/app/editor.less +++ b/services/web/public/stylesheets/app/editor.less @@ -12,9 +12,7 @@ @import "./editor/online-users.less"; @import "./editor/hotkeys.less"; @import "./editor/review-panel.less"; -& when (@show-rich-text) { - @import "./editor/rich-text.less"; -} +@import "./editor/rich-text.less"; @ui-layout-toggler-def-height: 50px; @ui-resizer-size: 7px; @@ -82,10 +80,7 @@ .full-size; } -#editor when (@show-rich-text = true) { - top: 40px; // TODO: replace with toolbar height var -} -#editor-rich-text when (@show-rich-text = true) { +#editor-rich-text { top: 40px; // TODO: replace with toolbar height var }