Skip to content

Commit c1c84d7

Browse files
committed
(fix) allow any plugin can make content editable
Signed-off-by: Dan Selman <danscode@selman.org>
1 parent 68cfdc3 commit c1c84d7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/PluginManager.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,21 @@ export default class PluginManager {
5454
}
5555

5656
/**
57-
* All plugins must return true for the plugin manager
58-
* to be editable.
57+
* If any plugin returns isEditable (true) then
58+
* the content is editable
5959
*
6060
* @param {Value} value the Slate value
6161
* @param {string} code the type of edit requested
6262
*/
6363
isEditable(value, code) {
6464
for (let n = 0; n < this.plugins.length; n += 1) {
6565
const plugin = this.plugins[n];
66-
if (plugin.isEditable && !plugin.isEditable(value, code)) {
67-
return false;
66+
if (plugin.isEditable && plugin.isEditable(value, code)) {
67+
return true;
6868
}
6969
}
7070

71-
return true;
71+
return false;
7272
}
7373

7474
/**

0 commit comments

Comments
 (0)