@pixerate/editor 0.8.0 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2115,6 +2115,7 @@ function createRichTextPreset(options = {}) {
2115
2115
  openOnClick: openLinksOnClick,
2116
2116
  autolink: true,
2117
2117
  defaultProtocol: "https",
2118
+ protocols: ["file", "vscode", "cursor"],
2118
2119
  HTMLAttributes: {
2119
2120
  target: "_blank",
2120
2121
  rel: "noopener noreferrer",
@@ -2335,6 +2336,13 @@ var md2 = new MarkdownIt({
2335
2336
  linkify: true,
2336
2337
  breaks: true
2337
2338
  }).use(taskLists);
2339
+ var defaultValidateLink = md2.validateLink;
2340
+ md2.validateLink = (url) => {
2341
+ if (url.startsWith("file://") || url.startsWith("vscode://") || url.startsWith("cursor://")) {
2342
+ return true;
2343
+ }
2344
+ return defaultValidateLink.call(md2, url);
2345
+ };
2338
2346
  function markdownToTipTapHtml(markdown) {
2339
2347
  if (!markdown) return "<p></p>";
2340
2348
  return md2.render(markdown);