autumnnote 2.5.0 → 2.6.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autumnnote",
3
- "version": "2.5.0",
3
+ "version": "2.6.0",
4
4
  "description": "WYSIWYG rich-text editor built with vanilla JavaScript \u2014 zero dependencies, no jQuery. Dark mode, @mention, markdown shortcuts, bubble toolbar. React and Vue\u00a03 wrappers included.",
5
5
  "type": "module",
6
6
  "main": "dist/autumnnote.cjs",
@@ -6,4 +6,11 @@ export interface SanitiseURLOptions {
6
6
  media?: boolean;
7
7
  }
8
8
  export function sanitiseHTML(html: string, options?: SanitiseHTMLOptions): string;
9
+ /**
10
+ * The same sanitisation as `sanitiseHTML`, returning the parsed `<body>` of a
11
+ * detached document instead of its serialisation. Adopt its children when the
12
+ * result is going straight into the DOM: it skips a serialise and a re-parse,
13
+ * and never re-parses a sanitised string.
14
+ */
15
+ export function sanitiseToBody(html: string, options?: SanitiseHTMLOptions): HTMLElement;
9
16
  export function sanitiseUrl(url: string | null | undefined, options?: SanitiseURLOptions): string | null;