@@ -2120,4 +2120,63 @@ test.describe('CopyAndPaste', () => {
2120
2120
` ,
2121
2121
) ;
2122
2122
} ) ;
2123
+
2124
+ test ( 'Paste content copied from google doc that contains bold italic underline formatting' , async ( {
2125
+ page,
2126
+ isPlainText,
2127
+ } ) => {
2128
+ test . skip ( isPlainText ) ;
2129
+ await focusEditor ( page ) ;
2130
+ const htmlFromGoogle = `<meta charset='utf-8'><meta charset="utf-8"><b style="font-weight:normal;" id="docs-internal-guid-d6ac4fde-7fff-3941-b4d9-3903abcccdcb"><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"><span style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:700;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;">Bold</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"><span style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:400;font-style:italic;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;">Italic</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"><span style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:underline;-webkit-text-decoration-skip:none;text-decoration-skip-ink:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;">underline</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"><span style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:700;font-style:italic;font-variant:normal;text-decoration:underline;-webkit-text-decoration-skip:none;text-decoration-skip-ink:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;">Bold Italic Underline</span></p></b><br class="Apple-interchange-newline">` ;
2131
+ const clipboardData = {
2132
+ 'text/html' : htmlFromGoogle ,
2133
+ } ;
2134
+ await pasteFromClipboard ( page , clipboardData ) ;
2135
+ await assertHTML (
2136
+ page ,
2137
+ html `
2138
+ < p
2139
+ class ="PlaygroundEditorTheme__paragraph PlaygroundEditorTheme__ltr "
2140
+ dir ="ltr ">
2141
+ < strong
2142
+ class ="PlaygroundEditorTheme__textBold "
2143
+ data-lexical-text ="true ">
2144
+ Bold
2145
+ </ strong >
2146
+ </ p >
2147
+ < p
2148
+ class ="PlaygroundEditorTheme__paragraph PlaygroundEditorTheme__ltr "
2149
+ dir ="ltr ">
2150
+ < em
2151
+ class ="PlaygroundEditorTheme__textItalic "
2152
+ data-lexical-text ="true ">
2153
+ Italic
2154
+ </ em >
2155
+ </ p >
2156
+ < p
2157
+ class ="PlaygroundEditorTheme__paragraph PlaygroundEditorTheme__ltr "
2158
+ dir ="ltr ">
2159
+ < span
2160
+ class ="PlaygroundEditorTheme__textUnderline "
2161
+ data-lexical-text ="true ">
2162
+ underline
2163
+ </ span >
2164
+ </ p >
2165
+ < p
2166
+ class ="PlaygroundEditorTheme__paragraph PlaygroundEditorTheme__ltr "
2167
+ dir ="ltr ">
2168
+ < strong
2169
+ class ="PlaygroundEditorTheme__textBold PlaygroundEditorTheme__textItalic
2170
+ PlaygroundEditorTheme__textUnderline "
2171
+ data-lexical-text ="true ">
2172
+ Bold Italic Underline
2173
+ </ strong >
2174
+ </ p >
2175
+ < p class ="PlaygroundEditorTheme__paragraph ">
2176
+ < br />
2177
+ < br />
2178
+ </ p >
2179
+ ` ,
2180
+ ) ;
2181
+ } ) ;
2123
2182
} ) ;
0 commit comments