Skip to content

Commit 9c6a4e9

Browse files
authored
Document the trix-before-paste event
1 parent 0c79bcb commit 9c6a4e9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,8 @@ The `<trix-editor>` element emits several events which you can use to observe an
359359

360360
* `trix-change` fires whenever the editor’s contents have changed.
361361

362+
* `trix-before-paste` fires just before text is pasted into the editor. You can use this to modify the content being pasted or prevent the paste event from happening at all. The `paste` property on the event contains the pasted `string` or `html`, and the `range` of the inserted text.
363+
*
362364
* `trix-paste` fires whenever text is pasted into the editor. The `paste` property on the event contains the pasted `string` or `html`, and the `range` of the inserted text.
363365

364366
* `trix-selection-change` fires any time the selected range changes in the editor.

0 commit comments

Comments
 (0)