8
0
Эх сурвалжийг харах

Fix whitespaces and code order

panr 5 жил өмнө
parent
commit
1abcc2dba4

+ 0 - 1
docs/assets/snippet-styles.css

@@ -195,7 +195,6 @@ It breaks CKEditor 5 (see how <p><code>[]</code></p> looks). */
 	margin-bottom: 1.5rem;
 }
 
-
 /* https://github.com/ckeditor/ckeditor5/issues/896 */
 .live-snippet .ck.ck-content h2,
 .live-snippet .ck.ck-content h3,

+ 3 - 3
docs/assets/snippet.js

@@ -13,12 +13,12 @@ setTimeout( () => {
 	const msWordMatch2 = /xmlns:o="urn:schemas-microsoft-com/i;
 
 	editables.forEach( editable => {
-		if ( !editable.ckeditorInstance ) {
+		const editor = editable.ckeditorInstance;
+
+		if ( !editor ) {
 			return;
 		}
 
-		const editor = editable.ckeditorInstance;
-
 		editor.plugins.get( 'Clipboard' ).listenTo( editor.editing.view.document, 'clipboardInput', ( evt, data ) => {
 			const htmlString = data.dataTransfer.getData( 'text/html' );
 			const match = msWordMatch1.test( htmlString ) ||