From 56cd774f775772fc0ed1b09725e7d0dfbe1ef0d8 Mon Sep 17 00:00:00 2001 From: Jalal Fathi Date: Wed, 4 Jan 2017 17:00:47 +0100 Subject: [PATCH] added options for getContent --- bower.json | 2 +- polymer-tinymce.html | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/bower.json b/bower.json index 5c9dc29..c4b8076 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "polymer-tinymce", - "version": "1.0.4", + "version": "1.0.5", "authors": [ "Jalal Fathi " ], diff --git a/polymer-tinymce.html b/polymer-tinymce.html index 24e432d..97d0a5c 100644 --- a/polymer-tinymce.html +++ b/polymer-tinymce.html @@ -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; },