diff --git a/README.md b/README.md
index 9e442fd..fd4ae8a 100644
--- a/README.md
+++ b/README.md
@@ -21,7 +21,9 @@ $ npm install vue-bulma-brace --save
:codefolding="'markbegin'"
:softwrap="'free'"
:selectionstyle="'text'"
- :highlightline="true">
+ :highlightline="true"
+ @code-change="codeChange"
+ ref="editor">
@@ -32,6 +34,15 @@ import Brace from 'vue-bulma-brace'
export default {
components: {
Brace
+ },
+ mounted () {
+ // Set the initial value
+ this.$refs.editor.setCode("// the initial value")
+ },
+ methods: {
+ codeChange (newValue) {
+ // Use the value
+ }
}
}
diff --git a/src/Brace.vue b/src/Brace.vue
index 72f08b5..0389dbb 100644
--- a/src/Brace.vue
+++ b/src/Brace.vue
@@ -1,5 +1,5 @@
-
+