two-way binding
johntom opened this issue · 0 comments
johntom commented
Im trying to get two-way binding to work.
view model
constructor() {
this.post.content = 'john robert'
}
view
<template>
<require from="froala-editor/css/froala_editor.pkgd.min.css"></require>
<require from="froala-editor/css/froala_style.min.css"></require>
<froala-editor
value.two-way="post.content"
config.bind="{
toolbarButtons: ['redo' , '|', 'fontFamily', '|', 'fontSize', '|', 'paragraphFormat', 'color', '|', 'bold', 'italic', 'underline', 'strikethrough', 'subscript', 'superscript', 'outdent', 'indent', 'clearFormatting', 'insertTable', 'html'],
toolbarButtonsMD: ['redo' , '|', 'fontFamily', '|', 'fontSize', '|', 'paragraphFormat', 'color'],
toolbarButtonsSM: ['redo' , '|', 'fontFamily', '|', 'fontSize', '|', 'paragraphFormat', 'color'],
toolbarButtonsXS: ['redo' , '|', 'fontFamily', '|', 'fontSize', '|', 'paragraphFormat', 'color'],
fontFamilySelection: true,
fontSizeSelection: true
}"></froala-editor>
</template>
john robert displays in editor but if I and text to john smith and modify size I only get john robert when checking post.content.
alert(`froala ${this.post.content} `);
I've carefully followed instructions for aurelia cli (main,js aurelia.json) and like to know why two-way binding is not working or what I'm doing wrong.
Thanks