autumnnote 2.5.0 → 2.7.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/README.md +28 -2
- package/dist/autumnnote.cjs +33 -31
- package/dist/autumnnote.core.es.js +1114 -933
- package/dist/autumnnote.core.es.js.map +1 -1
- package/dist/autumnnote.css +1 -1
- package/dist/autumnnote.es.js +788 -582
- package/dist/autumnnote.es.js.map +1 -1
- package/dist/autumnnote.min.js +33 -31
- package/dist/autumnnote.umd.js +33 -31
- package/dist/autumnnote.umd.js.map +1 -1
- package/package.json +1 -1
- package/types/core/sanitise.d.ts +7 -0
- package/types/index.d.ts +8 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "autumnnote",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.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",
|
package/types/core/sanitise.d.ts
CHANGED
|
@@ -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;
|
package/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* AutumnNote – TypeScript declarations
|
|
3
|
-
*
|
|
3
|
+
* The runtime version is sourced from package.json during the build.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
// ---------------------------------------------------------------------------
|
|
@@ -145,7 +145,14 @@ export interface AsnOptions {
|
|
|
145
145
|
/** Auto-load Prism.js for syntax highlighting inside code blocks. */
|
|
146
146
|
codeHighlight?: boolean;
|
|
147
147
|
/** CDN base URL for Prism assets. */
|
|
148
|
+
/** Base URL for Prism assets, or your own origin to self-host. A trailing slash is normalised away. */
|
|
148
149
|
codeHighlightCDN?: string;
|
|
150
|
+
/** CSP nonce applied to dynamically injected Prism and Font Awesome assets. */
|
|
151
|
+
cspNonce?: string;
|
|
152
|
+
/** crossorigin value applied to optional external assets. Default: 'anonymous'. */
|
|
153
|
+
externalAssetCrossOrigin?: '' | 'anonymous' | 'use-credentials';
|
|
154
|
+
/** Referrer policy applied to optional external assets. Default: 'no-referrer'. */
|
|
155
|
+
externalAssetReferrerPolicy?: ReferrerPolicy;
|
|
149
156
|
/** Convert pasted Markdown text to HTML. */
|
|
150
157
|
markdownPaste?: boolean;
|
|
151
158
|
/** Maximum undo/redo history steps. */
|