Skip to content

Commit

Permalink
Aligned component name to naming convention in CKEditor 5.
Browse files Browse the repository at this point in the history
  • Loading branch information
psmyrek committed Dec 30, 2024
1 parent e337f63 commit 756733d
Show file tree
Hide file tree
Showing 16 changed files with 28 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"path": "src/<%= formattedNames.plugin.lowerCaseMerged %>.<%= programmingLanguage %>",
"uiComponents": [
{
"name": "<%= formattedNames.plugin.camelCase %>Button",
"name": "<%= formattedNames.plugin.camelCase %>",
"type": "Button",
"iconPath": "theme/icons/ckeditor.svg"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ ClassicEditor
Base64UploadAdapter
],
toolbar: [
'<%= formattedNames.plugin.camelCase %>Button',
'<%= formattedNames.plugin.camelCase %>',
'|',
'heading',
'|',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
CKEditor5.upload.Base64UploadAdapter
],
toolbar: [
'<%= formattedNames.plugin.camelCase %>Button',
'<%= formattedNames.plugin.camelCase %>',
'|',
'heading',
'|',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export default class <%= formattedNames.plugin.pascalCase %> extends Plugin {
const t = editor.t;
const model = editor.model;

// Add the "<%= formattedNames.plugin.camelCase %>Button" to feature components.
editor.ui.componentFactory.add( '<%= formattedNames.plugin.camelCase %>Button', locale => {
// Register the "<%= formattedNames.plugin.camelCase %>" button, so it can be displayed in the toolbar.
editor.ui.componentFactory.add( '<%= formattedNames.plugin.camelCase %>', locale => {
const view = new ButtonView( locale );

view.set( {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe( '<%= formattedNames.plugin.pascalCase %>', () => {
<%= formattedNames.plugin.pascalCase %>
],
toolbar: [
'<%= formattedNames.plugin.camelCase %>Button'
'<%= formattedNames.plugin.camelCase %>'
]
} );
} );
Expand All @@ -45,11 +45,11 @@ describe( '<%= formattedNames.plugin.pascalCase %>', () => {
} );

it( 'should add an icon to the toolbar', () => {
expect( editor.ui.componentFactory.has( '<%= formattedNames.plugin.camelCase %>Button' ) ).to.equal( true );
expect( editor.ui.componentFactory.has( '<%= formattedNames.plugin.camelCase %>' ) ).to.equal( true );
} );

it( 'should add a text into the editor after clicking the icon', () => {
const icon = editor.ui.componentFactory.create( '<%= formattedNames.plugin.camelCase %>Button' );
const icon = editor.ui.componentFactory.create( '<%= formattedNames.plugin.camelCase %>' );

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ ClassicEditor
'undo',
'redo',
'|',
'<%= formattedNames.plugin.camelCase %>Button',
'<%= formattedNames.plugin.camelCase %>',
'|',
'heading',
'|',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export default class <%= formattedNames.plugin.pascalCase %> extends Plugin {
const t = editor.t;
const model = editor.model;

// Add the "<%= formattedNames.plugin.camelCase %>Button" to feature components.
editor.ui.componentFactory.add( '<%= formattedNames.plugin.camelCase %>Button', locale => {
// Register the "<%= formattedNames.plugin.camelCase %>" button, so it can be displayed in the toolbar.
editor.ui.componentFactory.add( '<%= formattedNames.plugin.camelCase %>', locale => {
const view = new ButtonView( locale );

view.set( {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe( '<%= formattedNames.plugin.pascalCase %>', () => {
<%= formattedNames.plugin.pascalCase %>
],
toolbar: [
'<%= formattedNames.plugin.camelCase %>Button'
'<%= formattedNames.plugin.camelCase %>'
]
} );
} );
Expand All @@ -42,11 +42,11 @@ describe( '<%= formattedNames.plugin.pascalCase %>', () => {
} );

it( 'should add an icon to the toolbar', () => {
expect( editor.ui.componentFactory.has( '<%= formattedNames.plugin.camelCase %>Button' ) ).to.equal( true );
expect( editor.ui.componentFactory.has( '<%= formattedNames.plugin.camelCase %>' ) ).to.equal( true );
} );

it( 'should add a text into the editor after clicking the icon', () => {
const icon = editor.ui.componentFactory.create( '<%= formattedNames.plugin.camelCase %>Button' );
const icon = editor.ui.componentFactory.create( '<%= formattedNames.plugin.camelCase %>' );

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ ClassicEditor
Base64UploadAdapter
],
toolbar: [
'<%= formattedNames.plugin.camelCase %>Button',
'<%= formattedNames.plugin.camelCase %>',
'|',
'heading',
'|',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
CKEditor5.upload.Base64UploadAdapter
],
toolbar: [
'<%= formattedNames.plugin.camelCase %>Button',
'<%= formattedNames.plugin.camelCase %>',
'|',
'heading',
'|',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export default class <%= formattedNames.plugin.pascalCase %> extends Plugin {
const t = editor.t;
const model = editor.model;

// Add the "<%= formattedNames.plugin.camelCase %>Button" to feature components.
editor.ui.componentFactory.add( '<%= formattedNames.plugin.camelCase %>Button', locale => {
// Register the "<%= formattedNames.plugin.camelCase %>" button, so it can be displayed in the toolbar.
editor.ui.componentFactory.add( '<%= formattedNames.plugin.camelCase %>', locale => {
const view = new ButtonView( locale );

view.set( {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe( '<%= formattedNames.plugin.pascalCase %>', () => {
<%= formattedNames.plugin.pascalCase %>
],
toolbar: [
'<%= formattedNames.plugin.camelCase %>Button'
'<%= formattedNames.plugin.camelCase %>'
]
} );
} );
Expand All @@ -43,11 +43,11 @@ describe( '<%= formattedNames.plugin.pascalCase %>', () => {
} );

it( 'should add an icon to the toolbar', () => {
expect( editor.ui.componentFactory.has( '<%= formattedNames.plugin.camelCase %>Button' ) ).to.equal( true );
expect( editor.ui.componentFactory.has( '<%= formattedNames.plugin.camelCase %>' ) ).to.equal( true );
} );

it( 'should add a text into the editor after clicking the icon', () => {
const icon = editor.ui.componentFactory.create( '<%= formattedNames.plugin.camelCase %>Button' );
const icon = editor.ui.componentFactory.create( '<%= formattedNames.plugin.camelCase %>' );

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ ClassicEditor
'undo',
'redo',
'|',
'<%= formattedNames.plugin.camelCase %>Button',
'<%= formattedNames.plugin.camelCase %>',
'|',
'heading',
'|',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
CKEditor5.upload.Base64UploadAdapter
],
toolbar: [
'<%= formattedNames.plugin.camelCase %>Button',
'<%= formattedNames.plugin.camelCase %>',
'|',
'heading',
'|',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export default class <%= formattedNames.plugin.pascalCase %> extends Plugin {
const t = editor.t;
const model = editor.model;

// Add the "<%= formattedNames.plugin.camelCase %>Button" to feature components.
editor.ui.componentFactory.add( '<%= formattedNames.plugin.camelCase %>Button', locale => {
// Register the "<%= formattedNames.plugin.camelCase %>" button, so it can be displayed in the toolbar.
editor.ui.componentFactory.add( '<%= formattedNames.plugin.camelCase %>', locale => {
const view = new ButtonView( locale );

view.set( {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe( '<%= formattedNames.plugin.pascalCase %>', () => {
<%= formattedNames.plugin.pascalCase %>
],
toolbar: [
'<%= formattedNames.plugin.camelCase %>Button'
'<%= formattedNames.plugin.camelCase %>'
]
} );
} );
Expand All @@ -40,11 +40,11 @@ describe( '<%= formattedNames.plugin.pascalCase %>', () => {
} );

it( 'should add an icon to the toolbar', () => {
expect( editor.ui.componentFactory.has( '<%= formattedNames.plugin.camelCase %>Button' ) ).to.equal( true );
expect( editor.ui.componentFactory.has( '<%= formattedNames.plugin.camelCase %>' ) ).to.equal( true );
} );

it( 'should add a text into the editor after clicking the icon', () => {
const icon = editor.ui.componentFactory.create( '<%= formattedNames.plugin.camelCase %>Button' );
const icon = editor.ui.componentFactory.create( '<%= formattedNames.plugin.camelCase %>' );

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

Expand Down

0 comments on commit 756733d

Please sign in to comment.