From 1a0154c9ea39993c1c24ca8407e9af194e4abfb9 Mon Sep 17 00:00:00 2001 From: Alasdair Smith Date: Thu, 22 Mar 2018 10:07:50 +0000 Subject: [PATCH] Load rich text code from module view include instead of hard coding --- services/web/app/views/project/editor.pug | 6 +----- services/web/app/views/project/editor/editor.pug | 12 ++---------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/services/web/app/views/project/editor.pug b/services/web/app/views/project/editor.pug index e4005a7e9c..33cfdfacfd 100644 --- a/services/web/app/views/project/editor.pug +++ b/services/web/app/views/project/editor.pug @@ -159,11 +159,7 @@ block requirejs window.pdfCMapsPath = "#{pdfCMapsPath}" window.uiConfig = JSON.parse('!{JSON.stringify(uiConfig).replace(/\//g, "\\/")}'); - if hasFeature('rich-text') - script( - src=buildWebpackPath('es/rich-text.js', {hashedPath:settings.useMinifiedJs}) - type="text/javascript" - ) + != moduleIncludes("editor:script", locals) script( data-main=buildJsPath("ide.js", {hashedPath:false}), diff --git a/services/web/app/views/project/editor/editor.pug b/services/web/app/views/project/editor/editor.pug index 15da9cdedf..b432a7aa09 100644 --- a/services/web/app/views/project/editor/editor.pug +++ b/services/web/app/views/project/editor/editor.pug @@ -30,9 +30,7 @@ div.full-size( i.fa.fa-arrow-left |   #{translate("open_a_file_on_the_left")} - if hasFeature('rich-text') - .toolbar.toolbar-editor(ng-controller="EditorToolbarController") - button(ng-click="toggleRichText()") Rich Text + != moduleIncludes('editor:toolbar', locals) #editor( ace-editor="editor", @@ -68,13 +66,7 @@ div.full-size( renderer-data="reviewPanel.rendererData" ) - if hasFeature('rich-text') - #editor-rich-text( - cm-editor, - ng-if="editor.richText" - ng-show="!!editor.sharejs_doc && !editor.opening" - sharejs-doc="editor.sharejs_doc" - ) + != moduleIncludes('editor:body', locals) include ./review-panel