8
0
Просмотр исходного кода

Aligned code to with new Batch#setAttributes API.

Oskar Wróbel 8 лет назад
Родитель
Сommit
120de4659f
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      packages/ckeditor5-autoformat/src/inlineautoformatengine.js

+ 2 - 2
packages/ckeditor5-autoformat/src/inlineautoformatengine.js

@@ -62,7 +62,7 @@ export default class InlineAutoformatEngine {
 	 *		// Use formatting callback:
 	 *		new InlineAutoformatEngine( editor, /(\*\*)([^\*]+?)(\*\*)$/g, ( batch, validRanges ) => {
 	 *			for ( let range of validRanges ) {
-	 *				batch.setAttribute( range, command, true );
+	 *				batch.setAttribute( command, true, range );
 	 *			}
 	 *		} );
 	 */
@@ -132,7 +132,7 @@ export default class InlineAutoformatEngine {
 		// A format callback run on matched text.
 		formatCallback = formatCallback || ( ( batch, validRanges ) => {
 			for ( const range of validRanges ) {
-				batch.setAttribute( range, command, true );
+				batch.setAttribute( command, true, range );
 			}
 		} );