@usememos/editor 26.11.0 → 26.11.2
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 +33 -33
- package/dist/index.js.map +3 -3
- package/dist/types/editor.d.ts +5 -2
- package/dist/types/view/dom.d.ts +10 -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
|
@@ -100,6 +100,8 @@ export declare class BlockRenderer {
|
|
|
100
100
|
private readonly root;
|
|
101
101
|
private readonly labels;
|
|
102
102
|
private rendered;
|
|
103
|
+
/** What the last render put in the root. Anything else there is the browser's (see `strayText`). */
|
|
104
|
+
private placed;
|
|
103
105
|
/** Last number written into each ordered item's marker, keyed by element. */
|
|
104
106
|
private readonly numbers;
|
|
105
107
|
/** The URL policy for links and images. Set before a full render. */
|
|
@@ -212,6 +214,14 @@ export declare class BlockRenderer {
|
|
|
212
214
|
* skip layout while off screen; use it only when loading a document.
|
|
213
215
|
*/
|
|
214
216
|
render(doc: Doc, force?: boolean, lazy?: boolean): void;
|
|
217
|
+
/**
|
|
218
|
+
* The text the browser left in the root, outside what the last render put
|
|
219
|
+
* there. WebKit, on committing a composition that is a block's whole text,
|
|
220
|
+
* removes the block's element and inserts the committed text in the root:
|
|
221
|
+
* as a text node for a paragraph, and inside elements that keep the block's
|
|
222
|
+
* look for others (`<span style="font-size: …"><b>` for a heading).
|
|
223
|
+
*/
|
|
224
|
+
strayText(): string;
|
|
215
225
|
/**
|
|
216
226
|
* The footnotes section, as GitHub renders one: every definition that is
|
|
217
227
|
* referenced, in order of first reference, each rendered as its block is
|