Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Simplified the structure of a build's source files #46

Closed
wants to merge 3 commits into from

Conversation

Reinmar
Copy link
Member

@Reinmar Reinmar commented Jun 8, 2018

Suggested merge commit message (convention)

Other: Simplified the structure of a build's source files. See ckeditor/ckeditor5#1038.

BREAKING CHANGES: TODO


Additional information

WIP. Will require changes in ckeditor5-core if we'll go this way with Editor's .defaultPlugins and .defaultConfig.

BTW, I was also thinking about Editor.builtinPlugins and Editor.builtinConfig which, at least for me, are more precise. I'm not sure, though, whether it isn't me only.

@Reinmar
Copy link
Member Author

Reinmar commented Jun 8, 2018

BTW, please note that I took the opportunity to better document what some of the things do in these files. Please read that too.

cc @AnnaTomanek

},

plugins: [
new CKEditorWebpackPlugin( {
language: buildConfig.config.language,
// UI language. Language codes follow the https://en.wikipedia.org/wiki/ISO_639-1 format.
// When changing the builtin language, remember to also change it in the ditor's config (src/ckeditor.js).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// When changing the built-in language, remember to also change it in the editor's configuration (src/ckeditor.js).

'@ckeditor/ckeditor5-paragraph/src/paragraph'
],

// Editor config.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// Editor configuration.

language: 'en'
}
// Plugins which will be automatically loaded when creating an instance of this editor build.
// Note: New plugins should not be added to an existing editor build. They should be added at this stage.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New plugins -> Additional plugins

}
// Plugins which will be automatically loaded when creating an instance of this editor build.
// Note: New plugins should not be added to an existing editor build. They should be added at this stage.
ClassicEditor.defaultPlugins = [
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea of calling it "buildInPlugins" because this is exactly what it is, and emphasize the fact that you can not change it in the runtime.

//
// See all the configuration options:
// https://docs.ckeditor.com/ckeditor5/latest/api/module_core_editor_editorconfig-EditorConfig.html
ClassicEditor.defaultConfig = {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However, I would not use buildInConfig. This it defaultConfig, which can be easily overwritten.

// UI language. Language codes follow the https://en.wikipedia.org/wiki/ISO_639-1 format.
//
// See: https://docs.ckeditor.com/ckeditor5/latest/features/ui-language.html
language: 'en'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we want to deduplicate it, this variable could be also overwritten by CKEditorWebpackPlugin since it already replaces some strings in the editor.

@Reinmar
Copy link
Member Author

Reinmar commented Sep 14, 2018

IDK what this PR is still doing here cause those changes were already merged in v11.0.0

@Reinmar Reinmar closed this Sep 14, 2018
@Reinmar Reinmar deleted the t/ckeditor5/1038 branch September 14, 2018 17:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants