From c4e22b271c0f1621c7ac15c8601a5035979bb3f4 Mon Sep 17 00:00:00 2001 From: panr Date: Mon, 9 Dec 2019 16:39:27 +0100 Subject: [PATCH] Fix: Removed ck- prefix. Closes #5899 --- .../features/restricted-editing.html | 8 +-- src/restrictededitingmode/converters.js | 4 +- src/restrictededitingmodeediting.js | 10 ++-- src/standardeditingmodeediting.js | 6 +-- tests/manual/restrictedediting.html | 6 +-- tests/restrictededitingmodeediting.js | 50 +++++++++---------- tests/standardeditingmodeediting.js | 8 +-- 7 files changed, 46 insertions(+), 46 deletions(-) diff --git a/docs/_snippets/features/restricted-editing.html b/docs/_snippets/features/restricted-editing.html index 49660f02..4b6480a2 100644 --- a/docs/_snippets/features/restricted-editing.html +++ b/docs/_snippets/features/restricted-editing.html @@ -5,13 +5,13 @@

-

Dear Customer Name,

+

Dear Customer Name,

-

thank you for contacting us. Your case was logged as Case ID and is assigned to Technician Name. We will attempt to resolve your issue within the next Time hours.

+

thank you for contacting us. Your case was logged as Case ID and is assigned to Technician Name. We will attempt to resolve your issue within the next Time hours.

-

Should you need any further assistance, do not hesitate to contact our Customer Support Hotline at Hotline Number.

+

Should you need any further assistance, do not hesitate to contact our Customer Support Hotline at Hotline Number.

Yours sincerely,
- Name
+ Name
Customer Support Team

diff --git a/src/restrictededitingmode/converters.js b/src/restrictededitingmode/converters.js index 09f1cf28..efa27a10 100644 --- a/src/restrictededitingmode/converters.js +++ b/src/restrictededitingmode/converters.js @@ -10,12 +10,12 @@ import Matcher from '@ckeditor/ckeditor5-engine/src/view/matcher'; import { getMarkerAtPosition } from './utils'; -const HIGHLIGHT_CLASS = 'ck-restricted-editing-exception_selected'; +const HIGHLIGHT_CLASS = 'restricted-editing-exception_selected'; /** * Adds a visual highlight style to a restricted editing exception the selection is anchored to. * - * Highlight is turned on by adding the `.ck-restricted-editing-exception_selected` class to the + * Highlight is turned on by adding the `.restricted-editing-exception_selected` class to the * exception in the view: * * * The class is removed before the conversion has started, as callbacks added with the `'highest'` priority diff --git a/src/restrictededitingmodeediting.js b/src/restrictededitingmodeediting.js index 3b6f3c1c..7b17fe54 100644 --- a/src/restrictededitingmodeediting.js +++ b/src/restrictededitingmodeediting.js @@ -20,7 +20,7 @@ import { getMarkerAtPosition, isSelectionInMarker } from './restrictededitingmod /** * The Restricted Editing Mode editing feature. * - * * It introduces the exception marker group that renders to `` with the `ck-restricted-editing-exception` CSS class. + * * It introduces the exception marker group that renders to `` with the `restricted-editing-exception` CSS class. * * It registers the `'goToPreviousRestrictedEditingException'` and `'goToNextRestrictedEditingException'` commands. * * Also enables highlighting exception markers that are selected. * @@ -115,7 +115,7 @@ export default class RestrictedEditingModeEditing extends Plugin { editor.conversion.for( 'upcast' ).add( upcastHighlightToMarker( { view: { name: 'span', - classes: 'ck-restricted-editing-exception' + classes: 'restricted-editing-exception' }, model: () => { markerNumber++; // Starting from restrictedEditingException:1 marker. @@ -133,7 +133,7 @@ export default class RestrictedEditingModeEditing extends Plugin { view: () => { return { name: 'span', - classes: 'ck-restricted-editing-exception', + classes: 'restricted-editing-exception', priority: -10 }; } @@ -145,7 +145,7 @@ export default class RestrictedEditingModeEditing extends Plugin { model: 'restrictedEditingException', view: ( markerData, viewWriter ) => { return viewWriter.createUIElement( 'span', { - class: 'ck-restricted-editing-exception ck-restricted-editing-exception_collapsed' + class: 'restricted-editing-exception restricted-editing-exception_collapsed' } ); } } ); @@ -154,7 +154,7 @@ export default class RestrictedEditingModeEditing extends Plugin { model: 'restrictedEditingException', view: ( markerData, viewWriter ) => { return viewWriter.createEmptyElement( 'span', { - class: 'ck-restricted-editing-exception' + class: 'restricted-editing-exception' } ); } } ); diff --git a/src/standardeditingmodeediting.js b/src/standardeditingmodeediting.js index 5cfeff51..8c7f8994 100644 --- a/src/standardeditingmodeediting.js +++ b/src/standardeditingmodeediting.js @@ -14,7 +14,7 @@ import RestrictedEditingExceptionCommand from './restrictededitingexceptioncomma * The Standard Editing Mode editing feature. * * * It introduces the `restrictedEditingException` text attributes that is rendered as - * `` with the `ck-restricted-editing-exception` CSS class. + * `` with the `restricted-editing-exception` CSS class. * * It registers the `'restrictedEditingException'` command. * * @extends module:core/plugin~Plugin @@ -39,7 +39,7 @@ export default class StandardEditingModeEditing extends Plugin { model: 'restrictedEditingException', view: { name: 'span', - classes: 'ck-restricted-editing-exception' + classes: 'restricted-editing-exception' } } ); @@ -48,7 +48,7 @@ export default class StandardEditingModeEditing extends Plugin { view: ( modelAttributeValue, viewWriter ) => { if ( modelAttributeValue ) { // Make the restricted editing outer-most in the view. - return viewWriter.createAttributeElement( 'span', { class: 'ck-restricted-editing-exception' }, { priority: -10 } ); + return viewWriter.createAttributeElement( 'span', { class: 'restricted-editing-exception' }, { priority: -10 } ); } } } ); diff --git a/tests/manual/restrictedediting.html b/tests/manual/restrictedediting.html index 9186494f..c1442d82 100644 --- a/tests/manual/restrictedediting.html +++ b/tests/manual/restrictedediting.html @@ -6,14 +6,14 @@

Heading 1

-

Paragraph it is editable

+

Paragraph it is editable

Bold Italic Link

  • UL List item 1
  • UL List item 2
    -
  1. OL List item 1
  2. +
  3. OL List item 1
  4. OL List item 2
@@ -24,7 +24,7 @@

Heading 1

Quote

  • Quoted UL List item 1
  • -
  • Quoted UL List item 2
  • +
  • Quoted UL List item 2

Quote

diff --git a/tests/restrictededitingmodeediting.js b/tests/restrictededitingmodeediting.js index 841742c2..4b0415a1 100644 --- a/tests/restrictededitingmodeediting.js +++ b/tests/restrictededitingmodeediting.js @@ -65,8 +65,8 @@ describe( 'RestrictedEditingModeEditing', () => { } ); describe( 'upcast', () => { - it( 'should convert to marker', () => { - editor.setData( '

foo bar baz

' ); + it( 'should convert to marker', () => { + editor.setData( '

foo bar baz

' ); expect( model.markers.has( 'restrictedEditingException:1' ) ).to.be.true; @@ -76,10 +76,10 @@ describe( 'RestrictedEditingModeEditing', () => { expect( marker.getEnd().path ).to.deep.equal( [ 0, 7 ] ); } ); - it( 'should convert multiple ', () => { + it( 'should convert multiple ', () => { editor.setData( - '

foo bar baz

' + - '

ABCDEFGHIJKLMNOPQRST

' + '

foo bar baz

' + + '

ABCDEFGHIJKLMNOPQRST

' ); expect( model.markers.has( 'restrictedEditingException:1' ) ).to.be.true; @@ -113,7 +113,7 @@ describe( 'RestrictedEditingModeEditing', () => { } ); } ); - const expectedView = '

foo bar baz

'; + const expectedView = '

foo bar baz

'; expect( editor.getData() ).to.equal( expectedView ); expect( getViewData( editor.editing.view, { withoutSelection: true } ) ).to.equal( expectedView ); } ); @@ -131,9 +131,9 @@ describe( 'RestrictedEditingModeEditing', () => { } ); } ); - expect( editor.getData() ).to.equal( '

foo bar baz

' ); + expect( editor.getData() ).to.equal( '

foo bar baz

' ); expect( getViewData( editor.editing.view, { withoutSelection: true } ) ).to.equal( - '

foo bar baz

' + '

foo bar baz

' ); } ); @@ -152,11 +152,11 @@ describe( 'RestrictedEditingModeEditing', () => { } ); expect( editor.getData() ).to.equal( - '

foo bar baz

' + '

foo bar baz

' ); expect( getViewData( editor.editing.view, { withoutSelection: true } ) ).to.equal( '

' + - 'foo bar baz' + + 'foo bar baz' + '

' ); } ); @@ -205,12 +205,12 @@ describe( 'RestrictedEditingModeEditing', () => { } ); expect( editor.getData() ).to.equal( - '

foo bar baz

' + - '

xxx yRyy zzz

' ); + '

foo bar baz

' + + '

xxx yRyy zzz

' ); expect( getViewData( editor.editing.view, { withoutSelection: true } ) ).to.equal( - '

foo bar baz

' + - '

xxx yRyy zzz

' ); + '

foo bar baz

' + + '

xxx yRyy zzz

' ); } ); it( 'should block user typing outside exception markers', () => { @@ -540,7 +540,7 @@ describe( 'RestrictedEditingModeEditing', () => { } ); expect( getViewData( view ) ).to.equal( - '

foo b{a}r baz

' + '

foo b{a}r baz

' ); } ); @@ -559,13 +559,13 @@ describe( 'RestrictedEditingModeEditing', () => { } ); expect( getViewData( view ) ).to.equal( - '

foo b{a}r baz

' + '

foo b{a}r baz

' ); model.change( writer => writer.setSelection( model.document.getRoot().getChild( 0 ), 0 ) ); expect( getViewData( view ) ).to.equal( - '

{}foo bar baz

' + '

{}foo bar baz

' ); } ); @@ -584,13 +584,13 @@ describe( 'RestrictedEditingModeEditing', () => { } ); expect( getViewData( view ) ).to.equal( - '

{}foo bar baz

' + '

{}foo bar baz

' ); model.change( writer => writer.setSelection( model.document.getRoot().getChild( 0 ), 6 ) ); expect( getViewData( view ) ).to.equal( - '

foo ba{}r baz

' + '

foo ba{}r baz

' ); } ); @@ -614,7 +614,7 @@ describe( 'RestrictedEditingModeEditing', () => { } ); expect( getViewData( view ) ).to.equal( - '

foo bFOO{a}r baz

' + '

foo bFOO{a}r baz

' ); } ); @@ -640,7 +640,7 @@ describe( 'RestrictedEditingModeEditing', () => { } ); expect( getViewData( view ) ).to.equal( - '

foo b{}r baz

' + '

foo b{}r baz

' ); } ); @@ -667,7 +667,7 @@ describe( 'RestrictedEditingModeEditing', () => { expect( getViewData( view ) ).to.equal( '

foo ' + - '' + + '' + 'b{a' + '}r' + ' baz

' @@ -696,7 +696,7 @@ describe( 'RestrictedEditingModeEditing', () => { } ); expect( getViewData( view ) ).to.equal( - '

foo {ba}r baz

' + '

foo {ba}r baz

' ); } ); @@ -728,7 +728,7 @@ describe( 'RestrictedEditingModeEditing', () => { expect( getViewData( view ) ).to.equal( '

' + 'foo ' + - '' + + '' + 'b{a}r' + '' + ' baz

' @@ -737,7 +737,7 @@ describe( 'RestrictedEditingModeEditing', () => { model.change( writer => writer.removeMarker( 'fooMarker' ) ); expect( getViewData( view ) ).to.equal( - '

foo b{a}r baz

' + '

foo b{a}r baz

' ); } ); } ); diff --git a/tests/standardeditingmodeediting.js b/tests/standardeditingmodeediting.js index 56d3f47c..d4f06bd8 100644 --- a/tests/standardeditingmodeediting.js +++ b/tests/standardeditingmodeediting.js @@ -52,8 +52,8 @@ describe( 'StandardEditingModeEditing', () => { describe( 'conversion', () => { describe( 'upcast', () => { - it( 'should convert to the model attribute', () => { - editor.setData( '

foo bar baz

' ); + it( 'should convert to the model attribute', () => { + editor.setData( '

foo bar baz

' ); expect( getModelData( model, { withoutSelection: true } ) ) .to.equal( 'foo <$text restrictedEditingException="true">bar baz' ); @@ -62,7 +62,7 @@ describe( 'StandardEditingModeEditing', () => { describe( 'downcast', () => { it( 'should convert the model attribute to a ', () => { - const expectedView = '

foo bar baz

'; + const expectedView = '

foo bar baz

'; setModelData( editor.model, 'foo <$text restrictedEditingException="true">bar baz' @@ -82,7 +82,7 @@ describe( 'StandardEditingModeEditing', () => { view: 'i' } ); - const expectedView = '

foo bar baz

'; + const expectedView = '

foo bar baz

'; setModelData( editor.model, '' +