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

Empty value after "html.set" #2233

Closed
alkoval opened this issue Sep 26, 2017 · 2 comments
Closed

Empty value after "html.set" #2233

alkoval opened this issue Sep 26, 2017 · 2 comments

Comments

@alkoval
Copy link

alkoval commented Sep 26, 2017

Expected behavior.

After sending the form to the server, you need to get the value from the editor.

Actual behavior.

The value in the form is equal to the empty.

Steps to reproduce the problem.

The editor is added to the textareatag in the form, for subsequent sending to the server. I pass the value to the editor using jquery:
$('#PreviewText').froalaEditor('html.set', response.previewText);
Visual text is displayed. But the counter is zero. When I submit a form, I get an empty value and when I try to get values, I get emptiness.
Screenshot

OS.

Windows 10. Visual Studio 2017.

Browser.

Chrome

@alkoval
Copy link
Author

alkoval commented Sep 26, 2017

If before sending to the form server, call this:
$('#PreviewText').froalaEditor('events.trigger', 'blur');
then you can get values from the editor.
Screenshot 2

@stefanneculai
Copy link
Contributor

@alkoval you should call the undo.saveStep method after setting the HTML.

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