Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Commit d2154dd

Browse files
committed
Merge pull request #107 from swolfod/master
fixing bug of activate/deactivate editor without initing the plugin
2 parents 47a22e5 + 91a1a5d commit d2154dd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/js/medium-editor-insert-plugin.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@
7575
this.elements[i].removeAttribute('contentEditable');
7676
}
7777

78-
$.fn.mediumInsert.insert.$el.mediumInsert('disable');
78+
if ($.fn.mediumInsert.insert.$el)
79+
$.fn.mediumInsert.insert.$el.mediumInsert('disable');
7980
};
8081

8182
/**
@@ -100,7 +101,8 @@
100101
}
101102
this.bindSelect();
102103

103-
$.fn.mediumInsert.insert.$el.mediumInsert('enable');
104+
if ($.fn.mediumInsert.insert.$el)
105+
$.fn.mediumInsert.insert.$el.mediumInsert('enable');
104106
};
105107
}
106108

0 commit comments

Comments
 (0)