Dmitry
Dmitry

Reputation: 14632

How to set a value of CodeMirror editor by javascript?

How to set a value of CodeMirror editor by javascript command? I just need to set a text to it. But how?.. Thanks a lot for the help!

Upvotes: 14

Views: 11370

Answers (1)

Felix Kling
Felix Kling

Reputation: 817238

It is explained in the manual, section Programming API:

setValue(string): Set the editor content.

Upvotes: 24

Related Questions