LogoLogo
Getting StartedDevelopersDeployment GuideGet Help
  • Quick Links
  • Welcome to Form.io
    • Getting Started With Form.io
    • Launch a Form
    • Overview of Form.io
  • Developer Tool Ecosystem
    • PDF Solution
    • Enterprise Form Builder
    • Form View Pro
    • The Security Module
    • Accessibility Compliance Module
    • Developer License
    • SQL Connector - Deprecated
    • Integration Libraries
    • Form.io CLI Tool
  • User Guide
    • Introduction
    • Form.io Developer Portal
    • Teams
    • Projects
      • Project UI
      • Project Settings
      • Stages
      • Multi-Tenancy
    • Resources
      • ResourceJS
    • Forms
      • Form Creation
      • Form Types
      • PDF Forms
      • Embedding a Form
      • Form Revisions
      • Form Settings
    • Form Building
      • Form Builder UI
      • Form Components
        • Component Settings
        • Basic Components
          • Resource as Select Component Data Source
        • Advanced Components
        • Layout Components
        • Data Components
        • Premium Components
          • Nested Forms
        • Custom Components
      • Logic & Conditions
      • Existing Resource Fields
      • Actions
    • Submissions
      • Accessing Submissions
      • Importing Submissions
    • Form.io eSignature - Coming Soon
    • Form.io Reporting Module
    • PDF Template Designer
    • Form View Pro
    • Form Manager
    • Enterprise Form Builder Module
  • Developer Guide
    • Introduction
      • Application Development
      • API Documentation
    • Form Development
      • Form Renderer
      • Form Builder
      • Form Embedding
      • Form Evaluations
      • Form Templates
      • Custom Components
      • Translations
    • JavaScript Development
      • JavaScript SDK
      • JavaScript Frameworks
      • JavaScript Utilities
    • Authentication and Authorization
      • SAML
      • OAuth
      • LDAP
      • Resource Based Authentication
      • Email Authentication
      • Two-Factor Authentication
    • Roles and Permissions
      • Field Match-Based Access
      • Field-Based Resource Access
      • Group Permissions
    • Integrations
      • Email Integrations
      • File Storage
      • Google Developer Console
      • eSign Integrations
      • Relational Databases
    • Modules
    • Fetch Plugin API
    • CSS Frameworks
    • Offline Mode
    • Audit Logging
  • Deployments
    • Self-Hosted Deployment
      • Local Deployment
        • Local File Storage
      • Kubernetes
      • Cloud Deployment
        • AWS Deployment
          • AWS Lambda
          • Form.io/AWS Elastic Beanstalk End-To-End Encrypted Deployment
        • Azure Deployment
          • Azure App Service
            • Azure MSSQL Connector - Deprecated
          • Azure Virtual Machine
          • Azure Kubernetes Service
          • Set up the DB
        • GCP Deployment
          • GCP Cloud Run
      • On-Premise Deployment
      • Enterprise Server
      • PDF Server
    • Deployment Configurations
      • DNS Configuration
      • Load Balancer Configuration
    • Licenses
      • License Management
      • Library Licenses
    • Portal Base Project
      • Portal SSO
      • Portal Translations
    • Maintenance and Migration
      • Changes to Premium Libraries
  • FAQ
    • FAQ
    • Tutorials & Workflows
      • Password Reset
      • Dynamic Select Filtering
      • Approval Workflow
      • SSO Email Token
      • Embedding A Video
      • Data Source Validation
      • Select Data Source Options
      • Nested Form Workflows
        • Nested Wizard Forms
      • Save as Draft
      • Role-Based Conditions
      • Custom Component
      • Dynamic Radio and Select Box Values
      • Override CKEDITOR
    • Errors
    • Examples
    • License Utilization Checks
  • Contact Us
Powered by GitBook
On this page
  • Extending the ckeditor repository
  • Adding ckeditor to your application

Was this helpful?

  1. FAQ
  2. Tutorials & Workflows

Override CKEDITOR

Override the default CKEDITOR with your own plugins, toolbar, etc.

PreviousDynamic Radio and Select Box ValuesNextErrors

Last updated 4 months ago

Was this helpful?

To override the CKEDITOR with your own custom plugins and default configurations you will need to clone the ckeditor5 repository, add your own custom code, and then build and put the script into your application. This tutorial will go over the steps on how to achieve this by going through an example of adding the underline tool to the CKEDITOR toolbar.

Extending the ckeditor repository

In order to create your own custom ckeditor you will need to extend the repository with your own custom plugins and imports.

  1. Start by downloading the files from

  2. Run yarn install or npm install

  3. Install your plugins

  4. import the plugin into src/ckeditor.js (In this example we will be importing the underline plugin)

    import Underline from "@ckeditor/ckeditor5-basic-styles/src/underline";
  5. In the ClassicEditor.bultinPlugins property add the import(s) to the list

    ClassicEditor.builtinPlugins = [
        Essentials,
        UploadAdapter,
        Autoformat,
        Bold,
        Italic,
        Underline,
        ...
  6. Optional: If you would like all your ckeditors to have the underline tool then you can add 'underline' to ClassicEditor.defaultConfig.toolbar.items

ClassicEditor.defaultConfig = {
    toolbar: {
       items: [
          'heading',
          'fontFamily',
          'fontSize',
          '|',
          'bold',
          'italic',
          'link',
          'bulletedList',
          'numberedList',
          '|',
          'indent',
          'outdent',
          '|',
          'imageUpload',
          'blockQuote',
          'insertTable',
          'mediaEmbed',
          'alignment:left',
          'alignment:right',
          'alignment:center',
          'undo',
          'redo',
          'underline'
       ]
    },
  1. Run yarn build or npm run build

  2. You should now see build/ckeditor.js. This will be put into your application in the upcoming next steps

Adding ckeditor to your application

Now that you have bundled your extended ckeditor, the next thing to do is to put it into your application. This tutorial will create a barebones index.html file as our application and use <script> tags to import Formio and the ckeditor (If you already have an application then you may want to skip some of the following steps)

  1. Start by creating a new project folder

  2. In your project folder create a file called index.html and add the following to the file

<!doctype html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>Document</title>
        <script src="./ckeditor.js"></script>
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css">
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap/dist/css/bootstrap.min.css">
        <script src='https://cdn.form.io/js/formio.full.min.js'></script>
    </head>
    <body>
        <div id="formio"></div>
        <script>
            Formio.createForm(document.getElementById('formio'), {
                components: [
                    {
                        "label": "Text Area",
                        "applyMaskOn": "change",
                        "editor": "ckeditor",
                        "autoExpand": false,
                        "tableView": true,
                        "validateWhenHidden": false,
                        "key": "textArea",
                        "type": "textarea",
                        "isUploadEnabled": false,
                        "wysiwyg": {
                            "toolbar": ['undo', 'redo', 'underline', 'bold'],
                            "rows": 3,
                            "base64Upload": true,
                            "mediaEmbed": {
                                "previewsInData": true
                            }
                        },
                        "input": true
                    }
                ]
            }, {})
        </script>
    </body>
</html>
  1. Then copy the build/ckeditor.js file created earlier into your project folder. Your project folder should look something like this

  2. Then locally serve your index.html file and you should now see the underline option in your toolbar.

ckeditor5-build-classic
ckeditor5-build-classic