mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 06:33:55 +01:00
Hide rich text behind feature flag
This commit is contained in:
@@ -14,5 +14,7 @@ module.exports = Features =
|
|||||||
return Settings.enableGithubSync
|
return Settings.enableGithubSync
|
||||||
when 'v1-return-message'
|
when 'v1-return-message'
|
||||||
return Settings.accountMerge? and Settings.overleaf?
|
return Settings.accountMerge? and Settings.overleaf?
|
||||||
|
when 'rich-text'
|
||||||
|
return Settings.showRichText
|
||||||
else
|
else
|
||||||
throw new Error("unknown feature: #{feature}")
|
throw new Error("unknown feature: #{feature}")
|
||||||
|
|||||||
@@ -159,10 +159,11 @@ block requirejs
|
|||||||
window.uiConfig = JSON.parse('!{JSON.stringify(uiConfig).replace(/\//g, "\\/")}');
|
window.uiConfig = JSON.parse('!{JSON.stringify(uiConfig).replace(/\//g, "\\/")}');
|
||||||
|
|
||||||
// TODO: inject based on environment
|
// TODO: inject based on environment
|
||||||
script(
|
if hasFeature('rich-text')
|
||||||
src="http://localhost:3809/public/js/es/richText.js"
|
script(
|
||||||
type="text/javascript"
|
src="http://localhost:3809/public/js/es/richText.js"
|
||||||
)
|
type="text/javascript"
|
||||||
|
)
|
||||||
|
|
||||||
script(
|
script(
|
||||||
data-main=buildJsPath("ide.js", {hashedPath:false}),
|
data-main=buildJsPath("ide.js", {hashedPath:false}),
|
||||||
|
|||||||
@@ -30,8 +30,9 @@ div.full-size(
|
|||||||
i.fa.fa-arrow-left
|
i.fa.fa-arrow-left
|
||||||
| #{translate("open_a_file_on_the_left")}
|
| #{translate("open_a_file_on_the_left")}
|
||||||
|
|
||||||
.toolbar.toolbar-editor(ng-controller="EditorToolbarController")
|
if hasFeature('rich-text')
|
||||||
button(ng-click="toggleRichText()") Rich Text
|
.toolbar.toolbar-editor(ng-controller="EditorToolbarController")
|
||||||
|
button(ng-click="toggleRichText()") Rich Text
|
||||||
|
|
||||||
#editor(
|
#editor(
|
||||||
ace-editor="editor",
|
ace-editor="editor",
|
||||||
@@ -66,11 +67,12 @@ div.full-size(
|
|||||||
renderer-data="reviewPanel.rendererData"
|
renderer-data="reviewPanel.rendererData"
|
||||||
)
|
)
|
||||||
|
|
||||||
#editor-rich-text(
|
if hasFeature('rich-text')
|
||||||
cm-editor
|
#editor-rich-text(
|
||||||
ng-if="!editor.opening && editor.richText"
|
cm-editor
|
||||||
sharejs-doc="editor.sharejs_doc"
|
ng-if="!editor.opening && editor.richText"
|
||||||
)
|
sharejs-doc="editor.sharejs_doc"
|
||||||
|
)
|
||||||
|
|
||||||
include ./review-panel
|
include ./review-panel
|
||||||
|
|
||||||
|
|||||||
@@ -192,4 +192,3 @@ define [
|
|||||||
|
|
||||||
toggleRichText: () ->
|
toggleRichText: () ->
|
||||||
@$scope.editor.richText = !@$scope.editor.richText
|
@$scope.editor.richText = !@$scope.editor.richText
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user