Skip to content

Commit

Permalink
added options for getContent
Browse files Browse the repository at this point in the history
  • Loading branch information
JaySunSyn committed Jan 4, 2017
1 parent f9e223f commit 56cd774
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "polymer-tinymce",
"version": "1.0.4",
"version": "1.0.5",
"authors": [
"Jalal Fathi <[email protected]>"
],
Expand Down
12 changes: 9 additions & 3 deletions polymer-tinymce.html
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,17 @@
},

/**
* Returns the content of the editor.
* Gets the content from the editor instance, this will cleanup the content before it gets returned using
* the different cleanup rules options.
* Updates the value property.
*/
getContent: function(){
var content = tinyMCE.get(this._textareaId).getContent();
getContent: function(options){
if (typeof options !== 'undefined') {
var content = tinyMCE.get(this._textareaId).getContent(options);
} else {
var content = tinyMCE.get(this._textareaId).getContent();
}

this._setValue(content);
return content;
},
Expand Down

0 comments on commit 56cd774

Please sign in to comment.