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

Updating Editor Content with Javascript #237

Closed
suhailshub-arch opened this issue Mar 12, 2024 · 1 comment
Closed

Updating Editor Content with Javascript #237

suhailshub-arch opened this issue Mar 12, 2024 · 1 comment

Comments

@suhailshub-arch
Copy link

$("#id_description").val(ui.item.description);

I am trying to edit the content of the editor like this. However, the editor side does not change at all. But when I click preview the correct output is shown. Is there any way to update the editor content programmatically?

@suhailshub-arch
Copy link
Author

var editor = ace.edit('martor-description');
editor.setValue($("#id_description").val(), -1)

I did it this way and it worked

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