2017 © Pedro Peláez
 

craft-plugin ckeditor

Edit rich text content in Craft CMS using CKEditor.

image

craftcms/ckeditor

Edit rich text content in Craft CMS using CKEditor.

  • Saturday, July 28, 2018
  • by brandonkelly
  • Repository
  • 6 Watchers
  • 11 Stars
  • 3,039 Installations
  • CSS
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 9 Open issues
  • 4 Versions
  • 39 % Grown

The README.md

CKEditor for Craft CMS

This plugin adds a “CKEditor” field type to Craft CMS, which provides a wrapper for CKEditor., (*1)

Requirements

This plugin requires Craft CMS 3.6 or later., (*2)

Installation

You can install this plugin from the Plugin Store or with Composer., (*3)

From the Plugin Store

Go to the Plugin Store in your project’s Control Panel and search for “CKEditor”. Then click on the “Install” button in its modal window., (*4)

With Composer

Open your terminal and run the following commands:, (*5)

# go to the project directory
cd /path/to/my-project.test

# tell Composer to load the plugin
composer require craftcms/ckeditor

# tell Craft to install the plugin
./craft install/plugin ckeditor

Providing a CKEditor Build

CKEditor 5 (27.0.0, “classic” build) is used by default. To customize the CKEditor build, go to SettingsCKEditor, and edit the CKEditor Build URL setting., (*6)

You can set this to a build provided by the CKEditor CDN, or you can supply your own customized CKEditor build, published somewhere within your web root., (*7)

Configuration

Editor Configuration

If you want to customize a field’s configuration options, you can do that by providing custom initialization code for the field, from its Initialization Code setting., (*8)

Reference the source <textarea> element’s ID using “__EDITOR__”, and be sure that the code returns the editor instance., (*9)

// CKEditor 4
return CKEDITOR.replace('__EDITOR__', {
    language: Craft.language.toLowerCase(),
    // ...
});

// CKEditor 5
return await ClassicEditor
    .create(document.querySelector('#__EDITOR__'), {
        language: Craft.language.toLowerCase(),
        // ...
    });

HTML Purifier Configs

CKEditor fields use HTML Purifier to ensure that no malicious code makes it into its field values, to prevent XSS attacks and other vulnerabilities., (*10)

You can create custom HTML Purifier configs that will be available to your CKEditor fields. They should be created as JSON files in your config/htmlpurifier/ folder., (*11)

Use this as a starting point, which is the default config that CKEditor fields use if no custom HTML Purifier config is selected:, (*12)

{
  "Attr.AllowedFrameTargets": [
    "_blank"
  ],
  "Attr.EnableID": true
}

See the HTML Purifier documentation for a list of available config options., (*13)

The Versions

28/07 2018

dev-master

9999999-dev

Edit rich text content in Craft CMS using CKEditor.

  Sources   Download

MIT

The Requires

 

yii2 html cms ckeditor craftcms

20/06 2018

dev-Bugfix/empty-field-5

dev-Bugfix/empty-field-5

Edit rich text content in Craft CMS using CKEditor.

  Sources   Download

MIT

The Requires

 

yii2 html cms ckeditor craftcms

15/01 2018

1.0.0-beta.2

1.0.0.0-beta2

Edit rich text content in Craft CMS using CKEditor.

  Sources   Download

MIT

The Requires

 

yii2 html cms ckeditor craftcms

04/12 2017

1.0.0-beta.1

1.0.0.0-beta1

Edit rich text content in Craft CMS using CKEditor.

  Sources   Download

MIT

The Requires

 

yii2 html cms ckeditor craftcms