Skip to content
This repository has been archived by the owner on Dec 21, 2021. It is now read-only.

Commit

Permalink
Add refresh method
Browse files Browse the repository at this point in the history
  • Loading branch information
alecritson committed Apr 12, 2019
1 parent e93a51f commit a288c5a
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
@ready="$emit('ready', $event)"
@focus="$emit('focus', $event)"
@input="$emit('input', $event)"
ref="editor"
>
</codemirror>
</template>
Expand All @@ -20,6 +21,13 @@
components: {
codemirror,
},
methods: {
refresh() {
Vue.nextTick(() => {
this.$refs['editor'].codemirror.refresh();
});
}
},
props: {
value: {
Expand Down

0 comments on commit a288c5a

Please sign in to comment.