File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
src/extensions/behavior/Clipboard Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -129,13 +129,19 @@ export const clipboard = ({
129129 const codeType = isInsideCode ( view . state ) ;
130130 if ( codeType ) {
131131 const schema : Schema = view . state . schema ;
132+ const insideCodeData = e . clipboardData . getData ( DataTransferType . Text ) ;
133+
132134 view . dispatch (
133135 trackTransactionMetrics (
134136 view . state . tr . replaceSelectionWith (
135- schema . text ( codeType === 'inline' ? data . trim ( ) : data ) ,
137+ schema . text (
138+ codeType === 'inline'
139+ ? insideCodeData . trim ( )
140+ : insideCodeData ,
141+ ) ,
136142 ) ,
137143 'paste' ,
138- { clipboardDataFormat : dataFormat , code : codeType } ,
144+ { clipboardDataFormat : DataTransferType . Text , code : codeType } ,
139145 ) ,
140146 ) ;
141147 isPasteHandled = true ;
You can’t perform that action at this time.
0 commit comments