ソースを参照

Code should not be copied to a new line on Enter

Paweł Kwaśnik 5 年 前
コミット
96472fb492

+ 1 - 1
packages/ckeditor5-basic-styles/src/code/codeediting.js

@@ -48,7 +48,7 @@ export default class CodeEditing extends Plugin {
 		editor.model.schema.extend( '$text', { allowAttributes: CODE } );
 		editor.model.schema.setAttributeProperties( CODE, {
 			isFormatting: true,
-			copyOnEnter: true
+			copyOnEnter: false
 		} );
 
 		editor.conversion.attributeToElement( {

+ 1 - 1
packages/ckeditor5-basic-styles/tests/code/codeediting.js

@@ -54,7 +54,7 @@ describe( 'CodeEditing', () => {
 
 	it( 'its attribute is marked with a copOnEnter property', () => {
 		expect( model.schema.getAttributeProperties( 'code' ) ).to.include( {
-			copyOnEnter: true
+			copyOnEnter: false
 		} );
 	} );