Skip to content

Commit ed990a6

Browse files
committed
Use editor instance.
1 parent 11ab318 commit ed990a6

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/views/DesignEdit.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<button v-on:click="exportHtml">Export HTML</button>
1010
</div>
1111

12-
<EmailEditor ref="editor" v-on:load="editorLoaded" />
12+
<EmailEditor ref="emailEditor" v-on:load="editorLoaded" />
1313
</div>
1414
</div>
1515
</template>
@@ -26,14 +26,14 @@ export default {
2626
editorLoaded() {
2727
},
2828
saveDesign() {
29-
this.$refs.editor.saveDesign(
29+
this.$refs.emailEditor.editor.saveDesign(
3030
(design) => {
3131
console.log('saveDesign', design);
3232
}
3333
)
3434
},
3535
exportHtml() {
36-
this.$refs.editor.exportHtml(
36+
this.$refs.emailEditor.editor.exportHtml(
3737
(data) => {
3838
console.log('exportHtml', data);
3939
}

src/views/Example.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<button v-on:click="exportHtml">Export HTML</button>
99
</div>
1010

11-
<EmailEditor ref="editor" v-on:load="editorLoaded" />
11+
<EmailEditor ref="emailEditor" v-on:load="editorLoaded" />
1212
</div>
1313
</div>
1414
</template>
@@ -24,17 +24,17 @@ export default {
2424
},
2525
methods: {
2626
editorLoaded() {
27-
this.$refs.editor.loadDesign(sample);
27+
this.$refs.emailEditor.editor.loadDesign(sample);
2828
},
2929
saveDesign() {
30-
this.$refs.editor.saveDesign(
30+
this.$refs.emailEditor.editor.saveDesign(
3131
(design) => {
3232
console.log('saveDesign', design);
3333
}
3434
)
3535
},
3636
exportHtml() {
37-
this.$refs.editor.exportHtml(
37+
this.$refs.emailEditor.editor.exportHtml(
3838
(data) => {
3939
console.log('exportHtml', data);
4040
}

0 commit comments

Comments
 (0)