Load rich text code from module view include instead of hard coding

This commit is contained in:
Alasdair Smith 2018-03-22 10:07:50 +00:00
parent 74099440f3
commit 1a0154c9ea
2 changed files with 3 additions and 15 deletions

View file

@ -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}),

View file

@ -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