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
|
||||
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;
|
||||
|
||||
//---------------
|
||||
@@ -280,11 +303,11 @@ export default {
|
||||
obj: {
|
||||
id: 0,
|
||||
concurrency: 0,
|
||||
name: null,
|
||||
active: null,
|
||||
notes: null,
|
||||
name: "report",
|
||||
active: true,
|
||||
notes: "",
|
||||
roles: null,
|
||||
objectType: 0,
|
||||
objectType: 124927, //all except customers
|
||||
template: `console.log('hello world');`,
|
||||
style: `.example {
|
||||
color: blue;
|
||||
|
||||
Reference in New Issue
Block a user