a tool for shared writing and social publishing
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

don't prepend mailto links with https

+4 -2
+4 -2
components/Toolbar/InlineLinkToolbar.tsx
··· 108 108 if (!editor || start === null || !end || !focusedBlock) return; 109 109 let tr = editor.tr; 110 110 let href = linkValue; 111 - if (!href.startsWith("http")) href = `https://${href}`; 111 + if (!href.startsWith("http") && !href.startsWith("mailto")) 112 + href = `https://${href}`; 112 113 tr.addMark(start, end, schema.marks.link.create({ href })); 113 114 tr.setSelection(TextSelection.create(tr.doc, tr.selection.to)); 114 115 setEditorState(focusedBlock?.entityID, { ··· 143 144 let tr = editor.tr; 144 145 145 146 let href = linkValue; 146 - if (!href.startsWith("http")) href = `https://${href}`; 147 + if (!href.startsWith("http") && !href.startsWith("mailto")) 148 + href = `https://${href}`; 147 149 tr.addMark(start, end, schema.marks.link.create({ href })); 148 150 setEditorState(focusedBlock?.entityID, { 149 151 editor: editor.apply(tr),