Skip to content

Commit

Permalink
cms: editor: cms.editor.indentWithTabs setting [non-working]
Browse files Browse the repository at this point in the history
  • Loading branch information
pplx committed Jun 4, 2018
1 parent dd404c3 commit 83913d6
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 5 deletions.
6 changes: 6 additions & 0 deletions applications/cms/config/cms.properties
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ render.live.exception.directive.nested.mode=RETHROW
render.live.exception.directive.url.mode=
render.live.exception.directive.asset.mode=

# Whether the template editor should use tabs instead of spaces.
# FIXME: 2018-06-04: currently this is only half-functional - codemirror only interprets
# this for existing spaces, not newly-inserted ones. Please leave this true until this is resolved
# in a sane way (https://github.com/codemirror/CodeMirror/issues/988).
cms.editor.indentWithTabs=true

# Global default CMS WebSite configuration values (com.ilscipio.scipio.cms.control.CmsWebSiteConfig)
# These are generally applied to any CMS-enabled websites that do not set these to non-empty values
# in their web.xml files, on a per-setting basis; EXCEPTION: defaultServletPath and defaultXxxServletPath
Expand Down
2 changes: 1 addition & 1 deletion applications/cms/webapp/cms/assets/editAsset.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
matchBrackets: true,
mode: "freemarker",
indentUnit: 4,
indentWithTabs: true,
indentWithTabs: ${indentWithTabs?string},
foldGutter: true,
gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"],
extraKeys: {"Ctrl-Space": "autocomplete"}
Expand Down
2 changes: 1 addition & 1 deletion applications/cms/webapp/cms/scripts/editScript.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ NOTES: 2016-12:
matchBrackets: true,
mode: "${escapeVal(editorLangMode, 'js')}",
indentUnit: 4,
indentWithTabs: true,
indentWithTabs: ${indentWithTabs?string},
foldGutter: true,
gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"],
extraKeys: {"Ctrl-Space": "autocomplete"}
Expand Down
2 changes: 1 addition & 1 deletion applications/cms/webapp/cms/templates/editTemplate.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
matchBrackets: true,
mode: "freemarker",
indentUnit: 4,
indentWithTabs: true,
indentWithTabs: ${indentWithTabs?string},
foldGutter: true,
gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"],
extraKeys: {"Ctrl-Space": "autocomplete"}
Expand Down
4 changes: 4 additions & 0 deletions applications/cms/widget/CommonScreens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@
they are a mix of CmsScriptTemplate.ScriptLang names, which are in part
from widget-common.xsd and the ofbiz script engine names, while others are brand new (e.g., screen-actions is new to scipio) -->
<script lang="groovy"><![CDATA[
import org.ofbiz.base.util.*;
ctx = globalContext;
// Script languages which can currently be executed from stored bodies
Expand All @@ -211,6 +213,8 @@
"none" : "text",
"default" : "text" // default is for anything that doesn't map into the above
];
ctx.indentWithTabs = UtilProperties.getPropertyAsBoolean("cms", "cms.editor.indentWithTabs", false);
]]></script>

</actions>
Expand Down
4 changes: 2 additions & 2 deletions framework/webtools/widget/MiscScreens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ under the License.
matchBrackets: true,
mode: "groovy",
indentUnit: 4,
indentWithTabs: false,
indentWithTabs: ${indentWithTabs?string},
foldGutter: true,
gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"],
extraKeys: {"Ctrl-Space": "autocomplete"}
Expand All @@ -886,7 +886,7 @@ under the License.
matchBrackets: true,
mode: "freemarker",
indentUnit: 4,
indentWithTabs: false,
indentWithTabs: ${indentWithTabs?string},
foldGutter: true,
gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"],
extraKeys: {"Ctrl-Space": "autocomplete"}
Expand Down

0 comments on commit 83913d6

Please sign in to comment.