@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/extensions/index.cjs +1 -0
- package/dist/extensions/index.cjs.map +1 -1
- package/dist/extensions/index.js +1 -0
- package/dist/extensions/index.js.map +1 -1
- package/dist/index.cjs +8 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/serializers/index.cjs +7 -0
- package/dist/serializers/index.cjs.map +1 -1
- package/dist/serializers/index.js +7 -0
- package/dist/serializers/index.js.map +1 -1
- package/package.json +1 -1
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);
|