diff --git a/src/extensions/LinkPicker.js b/src/extensions/LinkPicker.js index 76bde07a408..d399ee2bdbe 100644 --- a/src/extensions/LinkPicker.js +++ b/src/extensions/LinkPicker.js @@ -14,6 +14,10 @@ export default Extension.create({ char: '/', allowedPrefixes: [' '], pluginKey: LinkPickerPluginKey, + allow: ({ state, range }) => { + const $from = state.doc.resolve(range.from) + return $from.parent.type.name !== 'codeBlock' + }, ...suggestions(), }, }