Skip to content

Commit 74d1cd8

Browse files
Ignacio de TomásIgnacio de Tomás
Ignacio de Tomás
authored and
Ignacio de Tomás
committed
Merge branch 'chilian-master'
2 parents 73aa778 + 9e104c8 commit 74d1cd8

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -251,10 +251,10 @@ This object contains the strings that can be translated
251251
### Methods
252252

253253
The methods are invoked passing the name of the method as string.
254-
Only one method is available:
255254

256255
```javascript
257256
var content = $('#myEditor').markdownEditor('content'); // Returns the content of the editor
257+
$('#myEditor').markdownEditor('setContent', content); // Sets the content of the editor
258258
```
259259

260260
## License

src/bootstrap-markdown-editor.js

+4
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,10 @@
201201
content: function () {
202202
var editor = ace.edit(this.find('.md-editor')[0]);
203203
return editor.getSession().getValue();
204+
},
205+
setContent: function(str) {
206+
var editor = ace.edit(this.find('.md-editor')[0]);
207+
editor.setValue(str);
204208
}
205209
};
206210

0 commit comments

Comments
 (0)