Hi Hackers! CKEditor is a great open source tool that allows users to create and edit web content within a browser, and so much more!
If you're looking for a great way to make your development projects more robust, CKEditor is a great way to get started.
- If you have any questions about CKEditor or their Global Hack Week challenges, head to the MLH Discord and find the #ask-CKEditor channel!
- Each challenge is accompanied by helpful documentation
- Head over to the CKEditor sign up page to create an account and obtain the trial license key.
- In the CKEditor Customer Portal, navigate to the License keys tab to obtain your trial key.
- Submit a screenshot of your new account on our day-of GHW form!
- Go to the Builder: Open the CKEditor Builder to start customizing your editor.
- Select a Preset: Choose the Classic Editor preset as the foundation for your project.
- Pick Features:
- The preset includes pre-selected features.
- Enable additional features manually from the list to meet your needs. Avoid including the following features because these are relevant for the following challenges: Code Block, Templates, and Merge Fields.
- Customize the Toolbar: Customize the toolbar for an optimal experience.
- Download the project:
- Follow the setup steps provided by CKEditor Builder to generate the starter project. Specify Vanilla JS as technology and self-hosted as an integration method
- Share your implementation with us on our submission form and bonus points if you add your project to our Devpost Page!
-
Enhance your editor to support code blocks
-
Steps to Complete:
- Install the Plugin: Add the Code Block plugin to your CKEditor configuration.
- Use the CodeBlock plugin import from the ckeditor5 package.
- Add it to your plugins array in the configuration and items array of the toolbar.
- Customize the Plugin:
- Define the programming languages you want to support. Each language should have a language and label properties.
- Install the Plugin: Add the Code Block plugin to your CKEditor configuration.
-
Share your implementation with us on our submission form and bonus points if you add your project to our Devpost Page!
-
Implement templates for creating reusable document structures.
-
Steps to Complete:
- Enable the Template Plugin: Add the template plugin by importing it from the ckeditor5-premium-features package.
- Include Templates to the Editor Setup: Add it to your plugins array in the configuration and items array of the toolbar.
- Define Templates:
- By creating the definitions array, define the templates you want to use.
- Each template should have the following:
- title - short description of the template
- description - longer description
- data - a string that contains the HTML structure of a template
- Each template should have the following:
- By creating the definitions array, define the templates you want to use.
-
Share your implementation with us on our submission form and bonus points if you add your project to our Devpost Page!
-
Use merge fields to insert reusable content dynamically
-
Steps to Complete:
- Enable Merge Fields: Add the MergeFields plugin by importing it from the ckeditor5-premium-features package.
- Include Merge Fields to the Editor Setup: Add it to your plugins array in the configuration and items array of the toolbar.
- Define Merge Fields:
- By creating the definitions array inside the mergeFields configuration, define the merge fields you want to use.
- Each one should have:
- id
- label
- defaultValue
- Each one should have:
- By creating the definitions array inside the mergeFields configuration, define the merge fields you want to use.
- Use Merge Fields in templates: By using the id in the template, incorporate Merge Fields in your templates.
-
Share your implementation with us on our submission form and bonus points if you add your project to our Devpost Page!