fix: don’t add tabindex when readonly, fix #2458
This commit is contained in:
@@ -9,8 +9,12 @@ export const Tabindex = Extension.create({
|
|||||||
new Plugin({
|
new Plugin({
|
||||||
key: new PluginKey('tabindex'),
|
key: new PluginKey('tabindex'),
|
||||||
props: {
|
props: {
|
||||||
attributes: {
|
attributes: () => {
|
||||||
tabindex: '0',
|
if (this.editor.isEditable) {
|
||||||
|
return {
|
||||||
|
tabindex: '0',
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
|||||||
Reference in New Issue
Block a user