From 9da3cc802187647d4235a8350fdfe13188d7220c Mon Sep 17 00:00:00 2001 From: Julien Verkest Date: Fri, 13 Feb 2015 16:10:31 +0100 Subject: [PATCH] Update angular-medium-editor.js Insert plugin --- dist/angular-medium-editor.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dist/angular-medium-editor.js b/dist/angular-medium-editor.js index e5f2efe..8aace23 100644 --- a/dist/angular-medium-editor.js +++ b/dist/angular-medium-editor.js @@ -39,6 +39,10 @@ angular.module('angular-medium-editor', []) opts.placeholder = ''; } ctrl.editor = new MediumEditor(iElement, opts); + iElement.mediumInsert({ + editor: ctrl.editor + }); + }); var onChange = function() { @@ -50,6 +54,9 @@ angular.module('angular-medium-editor', []) if (iElement.html() === '


' || iElement.html() === '') { opts.placeholder = placeholder; var editor = new MediumEditor(iElement, opts); + iElement.mediumInsert({ + editor: editor + }); } ctrl.$setViewValue(iElement.html()); @@ -70,6 +77,9 @@ angular.module('angular-medium-editor', []) } this.editor = new MediumEditor(iElement, opts); + iElement.mediumInsert({ + editor: this.editor + }); } iElement.html(ctrl.$isEmpty(ctrl.$viewValue) ? '' : ctrl.$viewValue);