Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changelogs/3093.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
significance: patch
type: fixed
links:
- "#3057"
attributions:
- "@faisalahammad"
entry: Strip formatting when pasting into Course Builder title fields.
4 changes: 3 additions & 1 deletion assets/js/builder/Views/_Editable.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
* @since 3.16.0
* @since 3.25.4 Unknown
* @since 3.37.11 Replace reference to `wp.editor` with `_.getEditor()` helper.
* @version 3.37.11
* @since [version] Add paste event handler for plain contenteditable elements to strip formatting. Fixes #3057.
* @version [version]
*/
define( [], function() {

Expand All @@ -36,6 +37,7 @@ define( [], function() {
'keydown .llms-input': 'on_keydown',
'input .llms-input[type="number"]': 'on_blur',
'paste .llms-input[data-formatting]': 'on_paste',
'paste .llms-input[contenteditable]:not([data-formatting])': 'on_paste',
},

/**
Expand Down