@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.cjs CHANGED
@@ -2205,6 +2205,7 @@ function createRichTextPreset(options = {}) {
2205
2205
  openOnClick: openLinksOnClick,
2206
2206
  autolink: true,
2207
2207
  defaultProtocol: "https",
2208
+ protocols: ["file", "vscode", "cursor"],
2208
2209
  HTMLAttributes: {
2209
2210
  target: "_blank",
2210
2211
  rel: "noopener noreferrer",
@@ -2425,6 +2426,13 @@ var md2 = new import_markdown_it2.default({
2425
2426
  linkify: true,
2426
2427
  breaks: true
2427
2428
  }).use(import_markdown_it_task_lists2.default);
2429
+ var defaultValidateLink = md2.validateLink;
2430
+ md2.validateLink = (url) => {
2431
+ if (url.startsWith("file://") || url.startsWith("vscode://") || url.startsWith("cursor://")) {
2432
+ return true;
2433
+ }
2434
+ return defaultValidateLink.call(md2, url);
2435
+ };
2428
2436
  function markdownToTipTapHtml(markdown) {
2429
2437
  if (!markdown) return "<p></p>";
2430
2438
  return md2.render(markdown);