We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 68cfdc3 commit c1c84d7Copy full SHA for c1c84d7
src/PluginManager.js
@@ -54,21 +54,21 @@ export default class PluginManager {
54
}
55
56
/**
57
- * All plugins must return true for the plugin manager
58
- * to be editable.
+ * If any plugin returns isEditable (true) then
+ * the content is editable
59
*
60
* @param {Value} value the Slate value
61
* @param {string} code the type of edit requested
62
*/
63
isEditable(value, code) {
64
for (let n = 0; n < this.plugins.length; n += 1) {
65
const plugin = this.plugins[n];
66
- if (plugin.isEditable && !plugin.isEditable(value, code)) {
67
- return false;
+ if (plugin.isEditable && plugin.isEditable(value, code)) {
+ return true;
68
69
70
71
- return true;
+ return false;
72
73
74
0 commit comments