diff --git a/src/components/Suggestion/LinkPicker/suggestions.js b/src/components/Suggestion/LinkPicker/suggestions.js index 2f1f9b7055f..de5a5da9162 100644 --- a/src/components/Suggestion/LinkPicker/suggestions.js +++ b/src/components/Suggestion/LinkPicker/suggestions.js @@ -93,10 +93,15 @@ export default () => createSuggestions({ } getLinkWithPicker(props.providerId, true) .then(link => { - let content = link - - if (hasMarkdownSyntax(content) && isValidMarkdown(content)) { - content = markdownit.render(content) + if (hasMarkdownSyntax(link) && isValidMarkdown(link)) { + // Insert markdown content (e.g. from `text_templates` app) + const content = markdownit.render(link) + editor + .chain() + .focus() + .insertContentAt(range, content + ' ') + .run() + return } editor