Webanizr Logo
Open / sluit menu
Module ckEditor

Last change: August 30, 2020

Current version: 1.5.4

The module CKEditor loads a CKEditor editor on your website. In addition to calling the module you need to add a script to the head of your document. The module will send instructions on the first call.

syntax

webanizr.collect('ckEditor', parameters, callback);
webanizr.send('ckEditor', data, parameters, callback);

collect

parameters

Quill accepts the following parameters:

name__textarea (required)

The name of the textarea that needs to be converted to a CKEditor.

preset__toolbar (optional)

Generates a toolbar with less buttons using the configuration that preset in the module. Current preset options and list of buttons: If no preset is set, the buttons in default preset will be shown.

default: Heading, Bold, Italic, Underline,Strikethrough, numberedList, bulletedList, horizontalLine, undo, redo, alignment, Link, blockQuote, code,selectAll, MathType, ChemType, specialCharacters, mediaEmbed, insertTable, tableColumn, tableRow, mergeTableCells, tableCellProperties, tableProperties, ckfinder, imageTextAlternative, imageStyle:full, imageStyle:side.

simpletext: Bold, Italic, numberedList, bulletedList, horizontalLine, undo, redo, alignment, Link.

content-editor: Heading, Bold, Italic, Underline,Strikethrough, numberedList, bulletedList, horizontalLine, undo, redo, alignment, Link, blockQuote, selectAll, MathType, ChemType, specialCharacters.

description : bold, italic, underlined, paragraph format(heading 1-6 etc), numbered list, bulleted list, justify left, justify center, justify right, justify block, link, unlink.

config__toolbar (optional)

The configuration of the toolbar for the editor. You can configure your own toolbar on https://ckeditor.com/latest/samples/toolbarconfigurator/index.html#advanced.

note: config__toolbar won't be supported from version 1.5.0.

run__onchange

A script that runs whenever the content in the ckEditor changes. The script is given as an string. In the script you can use this.value to get the latest value of the ckEditor

callback

The callback is called after the editor is loaded. The callback function is called with empty data.

send

data

value__field(optional)

Sets the text value of the ckeditor field.

parameters

type__action(required)

The name of the action to take. Can be set to two values currently:

set: sets the ckeditor value to value__field that given in data.

clear: clears the ckeditor field.

name__textarea(required)

The name of the textarea that needs to be converted to a CKEditor.

callback

The callback is called after the editor is loaded. The callback function is called with empty data.

demo

https://cdn.cpmodules.webanizr.com/demo/text-editor/index.html

Changelog

  • August 30, 2020: 1.5.4 - unique script id for ckEditor 5.0.0.1
  • July 25, 2020: 1.5.3 - multiple fixes for ckeditor 5
  • July 24, 2020: 1.5.2 - reinstalled ckeditor from the site.
  • July 22, 2020: 1.5.1 - run on change and on blur methoods added.
  • July 22, 2020: 1.5.0 - migration from ckeditor4 to ckeditor5
  • July 13, 2020: 1.4.0 - added send function to ckeditor
  • July 13, 2020: 1.3.4 - ckeditor is loading dynamically now
  • March 09, 2020: 1.3.3 - updated the order of the buttons in description preset
  • March 05, 2020: 1.3.2 - changed the ckeditor version from standard to full
  • March 04, 2020: 1.3.1 - removed console.log()s
  • March 04, 2020: 1.3.0 - added preset__toolbar parameter
  • February 28, 2020: 1.2.0 - ??
  • September 5, 2019: 1.2.0 - added the config__toolbar parameter