This commit is contained in:
@@ -214,6 +214,29 @@ export default {
|
|||||||
});
|
});
|
||||||
//save the initial state because we're going to move away from it immediately
|
//save the initial state because we're going to move away from it immediately
|
||||||
vm.editData.template.state = editor.saveViewState();
|
vm.editData.template.state = editor.saveViewState();
|
||||||
|
|
||||||
|
//change subscription
|
||||||
|
editor.onDidChangeModelContent(event => {
|
||||||
|
const editorValue = editor.getValue();
|
||||||
|
// console.log("editorchange active tab=", vm.activeTab);
|
||||||
|
// console.log("editorchange, value of editor is", editorValue);
|
||||||
|
switch (vm.activeTab) {
|
||||||
|
case "template":
|
||||||
|
vm.obj.template = editorValue;
|
||||||
|
break;
|
||||||
|
case "style":
|
||||||
|
vm.obj.style = editorValue;
|
||||||
|
break;
|
||||||
|
case "jsPrerender":
|
||||||
|
vm.obj.jsPrerender = editorValue;
|
||||||
|
break;
|
||||||
|
case "jsHelpers":
|
||||||
|
vm.obj.jsHelpers = editorValue;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
vm.formState.dirty = true;
|
||||||
|
});
|
||||||
|
|
||||||
vm.showEditor = false;
|
vm.showEditor = false;
|
||||||
|
|
||||||
//---------------
|
//---------------
|
||||||
@@ -280,11 +303,11 @@ export default {
|
|||||||
obj: {
|
obj: {
|
||||||
id: 0,
|
id: 0,
|
||||||
concurrency: 0,
|
concurrency: 0,
|
||||||
name: null,
|
name: "report",
|
||||||
active: null,
|
active: true,
|
||||||
notes: null,
|
notes: "",
|
||||||
roles: null,
|
roles: null,
|
||||||
objectType: 0,
|
objectType: 124927, //all except customers
|
||||||
template: `console.log('hello world');`,
|
template: `console.log('hello world');`,
|
||||||
style: `.example {
|
style: `.example {
|
||||||
color: blue;
|
color: blue;
|
||||||
|
|||||||
Reference in New Issue
Block a user