autumnnote 1.14.0 → 1.15.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 CHANGED
@@ -121,7 +121,7 @@ Right-click inside the editor opens a context menu with: **Undo**, **Redo**, **C
121
121
  ### Security
122
122
  - All HTML (pasted content, `setHTML()`, or code-view output) passes through a DOM-based sanitiser that strips `<script>`, `<object>`, `<embed>`, and all `on*` event handler attributes
123
123
  - `<iframe>` elements are permitted in `setHTML()` with src restricted to trusted CDN hosts; `srcdoc` is stripped
124
- - `javascript:` and `data:` URLs are rejected in links and images
124
+ - Links use an HTTP(S)/`mailto:`/`tel:` allowlist; images additionally allow approved raster data URIs, while SVG data URIs are rejected
125
125
  - Clipboard paste sanitises rich content to remove XSS vectors before inserting
126
126
  - `pasteStripAttributes` option strips `class`, `style`, and `data-*` from pasted HTML
127
127
 
@@ -231,7 +231,7 @@ const editorRef = ref(null);
231
231
  </template>
232
232
  ```
233
233
 
234
- Access the editor instance via `editorRef.value.editor.value` (the `editor` reactive ref exposed by `defineExpose`).
234
+ Access the editor instance via `editorRef.value.editor`; Vue unwraps the component's internal shallow ref.
235
235
 
236
236
  ---
237
237
 
@@ -409,7 +409,7 @@ See the [full Plugin API docs →](https://autumn.konexforge.com/docs.html#plugi
409
409
  | Method | Description |
410
410
  |---|---|
411
411
  | `editor.getHTML()` | Returns the current HTML. Zero-width spaces from the icon picker are stripped automatically. |
412
- | `editor.setHTML(html)` | Sets HTML content (sanitised). `<iframe>` elements are preserved. |
412
+ | `editor.setHTML(html)` | Sets HTML content (sanitised). Only trusted HTTPS YouTube/Vimeo `<iframe>` sources are preserved. |
413
413
  | `editor.getText()` | Returns plain text with no markup. |
414
414
  | `editor.setText(text)` | Replaces the content with plain text (escaped, no markup). |
415
415
  | `editor.getMarkdown()` | Returns the current content converted to Markdown. |
@@ -447,6 +447,7 @@ See the [full Plugin API docs →](https://autumn.konexforge.com/docs.html#plugi
447
447
  | `imageUpload` | `files: FileList` | Fired when images are dropped or pasted (when `onImageUpload` is provided). |
448
448
  | `imageError` | `{ file, message }` | Fired when an image is rejected (e.g. over `maxImageSize`). |
449
449
  | `paste` | `{ text, html }` | Fired after every paste event. |
450
+ | `pasteError` | `{ message, size?, maxBytes? }` | Fired when paste/drop exceeds `maxPasteSize` or a dropped Markdown file cannot be read. |
450
451
  | `selectionChange` | `context` | Fired when the cursor or selection changes. |
451
452
  | `destroy` | `context` | Fired just before the editor is destroyed. |
452
453
  | `charLimitReached` | `context` | Fired when `maxChars` is hit. |
@@ -513,6 +514,7 @@ See the [full Plugin API docs →](https://autumn.konexforge.com/docs.html#plugi
513
514
  | `onImageUpload` | `Function` | `null` | `(files: FileList) => void` — custom upload handler. Overrides base64 embed. |
514
515
  | `onImageError` | `Function` | `null` | `({ file, message }) => void` — called when an image is rejected. |
515
516
  | `onPaste` | `Function` | `null` | `({ text, html }) => void` — called after every paste event. |
517
+ | `onPasteError` | `Function` | `null` | `({ message, size?, maxBytes? }) => void` — called when pasted or dropped content cannot be processed. |
516
518
  | `onSelectionChange` | `Function` | `null` | `(context) => void` — called when cursor or selection changes. |
517
519
  | `onDestroy` | `Function` | `null` | `(context) => void` — called just before the editor is destroyed. |
518
520
  | `onCharLimitReached` | `Function` | `null` | `(context) => void` — called when `maxChars` is hit. |
@@ -746,16 +748,18 @@ autumn-note-ce/
746
748
 
747
749
  ### Development commands
748
750
 
751
+ Development and package usage require Node 20.19+ and pnpm 11.1.3.
752
+
749
753
  ```bash
750
754
  pnpm install # install all workspace packages
751
- npm run dev # start Vite dev server with HMR
752
- npm run build # build core ES + UMD + CSS to dist/
755
+ pnpm dev # start Vite dev server with HMR
756
+ pnpm build # build core ES + UMD + CSS to dist/
753
757
  pnpm --filter autumnnote-react build # build React wrapper
754
758
  pnpm --filter autumnnote-vue build # build Vue wrapper
755
- npm test # run Vitest test suite once
756
- npm run test:watch # run tests in watch mode
757
- npm run lint # ESLint
758
- npm run typecheck # TypeScript type check (tsconfig.json)
759
+ pnpm test # run Vitest test suite once
760
+ pnpm test:watch # run tests in watch mode
761
+ pnpm lint # ESLint
762
+ pnpm typecheck # TypeScript type check (tsconfig.json)
759
763
  ```
760
764
 
761
765
  Build output in `dist/`:
@@ -763,7 +767,8 @@ Build output in `dist/`:
763
767
  | File | Format | Use |
764
768
  |---|---|---|
765
769
  | `autumnnote.es.js` | ES Module | `import` in bundlers (tree-shakeable) |
766
- | `autumnnote.umd.js` | UMD | `<script>` tag / CommonJS |
770
+ | `autumnnote.umd.js` | UMD | Browser `<script>` tag |
771
+ | `autumnnote.cjs` | CommonJS | `require('autumnnote')` in Node.js |
767
772
  | `autumnnote.css` | CSS | Styles for both builds |
768
773
 
769
774
  ---