justcaliturner / simple-code-editor

Simple code editor for Vue.js
https://simple-code-editor.vicuxd.com
154 stars 30 forks source link

v-model doesn't allow two-way sync #44

Open patrickryan79 opened 11 months ago

patrickryan79 commented 11 months ago

Vue.js 2.6.11

The following only works one-way (if code has a value, it's populated in the editor, but input is never emitted

<CodeEditor v-model="code"  />

Looking at the source code, I was able to make it work by doing this:

<CodeEditor :modelValue.sync="code"  />

Why is this? Is this a recent change? I obviously have concerns about stability. Or am I doing something entirely wrong?