@usememos/editor 26.10.30 → 26.11.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/README.md +1 -1
- package/dist/index.js +62 -62
- package/dist/index.js.map +3 -3
- package/dist/types/editor.d.ts +5 -2
- package/dist/types/view/dom.d.ts +7 -0
- package/package.json +1 -1
package/dist/types/editor.d.ts
CHANGED
|
@@ -631,7 +631,8 @@ export declare class Editor {
|
|
|
631
631
|
/**
|
|
632
632
|
* The model with the text the DOM shows: one delete and one insert per
|
|
633
633
|
* changed text container, inserted text getting `marks` when set. Only
|
|
634
|
-
* `blockId` when given
|
|
634
|
+
* `blockId` when given: the composition's block, with `ended` once the
|
|
635
|
+
* composition has ended. Null when the text is the same.
|
|
635
636
|
*/
|
|
636
637
|
private readDom;
|
|
637
638
|
private onKeyDown;
|
|
@@ -666,8 +667,10 @@ export declare class Editor {
|
|
|
666
667
|
private onPaste;
|
|
667
668
|
/** What a paste writes in source mode: the editor's own Markdown, other HTML as Markdown, else the text; inside a fence, the text as written. */
|
|
668
669
|
private pastedMarkdown;
|
|
669
|
-
/** The URL a paste makes a link of
|
|
670
|
+
/** The URL a paste over selected text makes a link of, when the paste is not plain. */
|
|
670
671
|
private pastedUrl;
|
|
672
|
+
/** The text as a link's URL: one URL whose scheme the URL policy allows, such as `https://` or `obsidian://`, else null. */
|
|
673
|
+
private linkableUrl;
|
|
671
674
|
/** Clipboard content as blocks: the editor's own Markdown, other HTML, or text as Markdown. */
|
|
672
675
|
private pastedBlocks;
|
|
673
676
|
private onDrop;
|
package/dist/types/view/dom.d.ts
CHANGED
|
@@ -241,6 +241,13 @@ export declare function contentElement(blockEl: HTMLElement, cell?: Cell): HTMLE
|
|
|
241
241
|
export declare function childIndex(node: Node): number;
|
|
242
242
|
/** Plain text of a content element as the browser currently has it, with atoms as one character. */
|
|
243
243
|
export declare function domText(contentEl: HTMLElement): string;
|
|
244
|
+
/**
|
|
245
|
+
* The text the browser left directly in the root, outside every block. The
|
|
246
|
+
* renderer puts only elements there. WebKit, on committing a composition that
|
|
247
|
+
* is a block's whole text, removes the block's element and inserts the
|
|
248
|
+
* committed text as a text node of the root.
|
|
249
|
+
*/
|
|
250
|
+
export declare function strayText(root: HTMLElement): string;
|
|
244
251
|
export declare function domToPosition(root: HTMLElement, node: Node, offset: number): Position | null;
|
|
245
252
|
/** The atom (an image or a rendered token) that starts at `pos`, or null. */
|
|
246
253
|
export declare function atomAt(blockEl: HTMLElement, pos: Position): HTMLElement | null;
|