How to bind div element content(inner html) to data field?

I implemented a custom select element that has some options. In this select element i have one div element that has selected option string value. so how to bind this div element content to a data field?

<div>{{selected}}</div>

…Assuming the data property in the component is called selected

But that’s so basic that I think you might mean something else?

yes. i mean two way binding.

Two way blinding only works with form fields. You can’t edit a div, so how should two-way-binding work?

when i click on every one of options, the value changes.

I think i found better solution. now i use custom directive to achieve my purpose.
https://vuejs.org/v2/guide/custom-directive.html

Any solution for two way binding of a div with contenteditable=“true”?

Any solution for two way binding of a div with contenteditable=“true”?

Just listen for ‘input’ event.