From 9c6a4e9ef6ed503b96d47f2019f0e3f2a0ed5faa Mon Sep 17 00:00:00 2001 From: Matheus Richard Date: Mon, 24 Jun 2024 17:53:32 -0300 Subject: [PATCH] Document the `trix-before-paste` event --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 0133f94a3..3d0e89b33 100644 --- a/README.md +++ b/README.md @@ -359,6 +359,8 @@ The `` element emits several events which you can use to observe an * `trix-change` fires whenever the editor’s contents have changed. +* `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. +* * `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. * `trix-selection-change` fires any time the selected range changes in the editor.