|
@@ -41,6 +41,16 @@ describe( 'Text transformation feature', () => {
|
|
|
describe( 'transformations', () => {
|
|
describe( 'transformations', () => {
|
|
|
beforeEach( createEditorInstance );
|
|
beforeEach( createEditorInstance );
|
|
|
|
|
|
|
|
|
|
+ it( 'should not work for selection changes', () => {
|
|
|
|
|
+ setData( model, '<paragraph>foo bar(tm) baz[]</paragraph>' );
|
|
|
|
|
+
|
|
|
|
|
+ model.change( writer => {
|
|
|
|
|
+ writer.setSelection( doc.getRoot().getChild( 0 ), 11 );
|
|
|
|
|
+ } );
|
|
|
|
|
+
|
|
|
|
|
+ expect( getData( model, { withoutSelection: true } ) ).to.equal( '<paragraph>foo bar(tm) baz</paragraph>' );
|
|
|
|
|
+ } );
|
|
|
|
|
+
|
|
|
describe( 'symbols', () => {
|
|
describe( 'symbols', () => {
|
|
|
testTransformation( '(c)', '©' );
|
|
testTransformation( '(c)', '©' );
|
|
|
testTransformation( '(tm)', '™' );
|
|
testTransformation( '(tm)', '™' );
|