Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

two-way binding #64

Open
johntom opened this issue Jun 12, 2020 · 0 comments
Open

two-way binding #64

johntom opened this issue Jun 12, 2020 · 0 comments

Comments

@johntom
Copy link

johntom commented Jun 12, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant