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

Covalent text-editor not updating value on changes #1722

Open
KingDarBoja opened this issue Apr 1, 2020 · 0 comments
Open

Covalent text-editor not updating value on changes #1722

KingDarBoja opened this issue Apr 1, 2020 · 0 comments
Assignees

Comments

@KingDarBoja
Copy link

Bug Report

The main issue is that the text-editor NgModel (value input in this case) isn't triggering changes on the property being passed to, so any attempt to check if the content is updated inside a NgForm will always be true.

What is the expected behavior?

Any changes to the content of the text editor should be saved on the object being passed to.

What is the motivation / use case for changing the behavior?

Trying to implement some NgForm which has the text-editor component so end users can type any markdown style stuff and gets saved on some cloud service (AWS DynamoDB in this case).

Which version of Angular and Material, and which browser and OS does this issue affect?

Other information

I added locally an output event as I was unable to store the changes of the editor content on some object property as the settings forceSync or autosave: { enabled: true } from the EasyMDE options didn't make it work.

@Output() valueChanged: EventEmitter<string> = new EventEmitter<string>();

With that change, I tested on the Covalent text editor demo like as follow:

<td-text-editor name="content" [value]="editorVal"
      (valueChanged)="onChanged($event)" [options]="baseOpts" required>
</td-text-editor>

I was able to fetch the content changes on another component with this change.

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

2 participants