@ckeditor/ckeditor5-basic-styles

  • Version 41.4.2
  • Published
  • 646 kB
  • 1 dependency
  • GPL-2.0-or-later license

Install

npm i @ckeditor/ckeditor5-basic-styles
yarn add @ckeditor/ckeditor5-basic-styles
pnpm add @ckeditor/ckeditor5-basic-styles

Overview

Basic styles feature for CKEditor 5.

Index

Classes

class AttributeCommand

class AttributeCommand extends Command {}
  • An extension of the base class, which provides utilities for a command that toggles a single attribute on a text or an element.

    AttributeCommand uses to decide which nodes (if any) should be changed, and applies or removes the attribute from them.

    The command checks the to decide if it can be enabled for the current selection and to which nodes the attribute can be applied.

constructor

constructor(editor: Editor, attributeKey: string);
  • Parameter attributeKey

    Attribute that will be set by the command.

property attributeKey

readonly attributeKey: string;
  • The attribute that will be set by the command.

property value

value: boolean;
  • Flag indicating whether the command is active. The command is active when the which means that:

    * If the selection is not empty – That the attribute is set on the first node in the selection that allows this attribute. * If the selection is empty – That the selection has the attribute itself (which means that newly typed text will have this attribute, too).

    Modifiers

    • @readonly

method execute

execute: (options?: { forceValue?: boolean }) => void;
  • Executes the command – applies the attribute to the selection or removes it from the selection.

    If the command is active (value == true), it will remove attributes. Otherwise, it will set attributes.

    The execution result differs, depending on the :

    * If the selection is on a range, the command applies the attribute to all nodes in that range (if they are allowed to have this attribute by the ). * If the selection is collapsed in a non-empty node, the command applies the attribute to the itself (note that typed characters copy attributes from the selection). * If the selection is collapsed in an empty node, the command applies the attribute to the parent node of the selection (note that the selection inherits all attributes from a node if it is in an empty node).

    execute

    Parameter options

    Command options.

    Parameter

    options.forceValue If set, it will force the command behavior. If true, the command will apply the attribute, otherwise the command will remove the attribute. If not set, the command will look for its current value to decide what it should do.

method refresh

refresh: () => void;
  • Updates the command's and based on the current selection.

class Bold

class Bold extends Plugin {}
  • The bold feature.

    For a detailed overview check the guide and the .

    This is a "glue" plugin which loads the and .

property pluginName

static readonly pluginName: string;

property requires

static readonly requires: readonly [typeof BoldEditing, typeof BoldUI];

class BoldEditing

class BoldEditing extends Plugin {}
  • The bold editing feature.

    It registers the 'bold' command and introduces the bold attribute in the model which renders to the view as a <strong> element.

property pluginName

static readonly pluginName: string;

method init

init: () => void;

class BoldUI

class BoldUI extends Plugin {}
  • The bold UI feature. It introduces the Bold button.

property pluginName

static readonly pluginName: string;

method init

init: () => void;

class Code

class Code extends Plugin {}
  • The code feature.

    For a detailed overview check the guide and the .

    This is a "glue" plugin which loads the and .

property pluginName

static readonly pluginName: string;

property requires

static readonly requires: readonly [typeof CodeEditing, typeof CodeUI];

class CodeEditing

class CodeEditing extends Plugin {}
  • The code editing feature.

    It registers the 'code' command and introduces the code attribute in the model which renders to the view as a <code> element.

property pluginName

static readonly pluginName: string;

property requires

static readonly requires: readonly [any];

method init

init: () => void;

class CodeUI

class CodeUI extends Plugin {}
  • The code UI feature. It introduces the Code button.

property pluginName

static readonly pluginName: string;

method init

init: () => void;

class Italic

class Italic extends Plugin {}
  • The italic feature.

    For a detailed overview check the guide and the .

    This is a "glue" plugin which loads the and plugins.

property pluginName

static readonly pluginName: string;

property requires

static readonly requires: readonly [typeof ItalicEditing, typeof ItalicUI];

class ItalicEditing

class ItalicEditing extends Plugin {}
  • The italic editing feature.

    It registers the 'italic' command, the Ctrl+I keystroke and introduces the italic attribute in the model which renders to the view as an <i> element.

property pluginName

static readonly pluginName: string;

method init

init: () => void;

class ItalicUI

class ItalicUI extends Plugin {}
  • The italic UI feature. It introduces the Italic button.

property pluginName

static readonly pluginName: string;

method init

init: () => void;

class Strikethrough

class Strikethrough extends Plugin {}
  • The strikethrough feature.

    For a detailed overview check the guide and the .

    This is a "glue" plugin which loads the and plugins.

property pluginName

static readonly pluginName: string;

property requires

static readonly requires: readonly [
typeof StrikethroughEditing,
typeof StrikethroughUI
];

class StrikethroughEditing

class StrikethroughEditing extends Plugin {}
  • The strikethrough editing feature.

    It registers the 'strikethrough' command, the Ctrl+Shift+X keystroke and introduces the strikethroughsthrough attribute in the model which renders to the view as a <s> element.

property pluginName

static readonly pluginName: string;

method init

init: () => void;

class StrikethroughUI

class StrikethroughUI extends Plugin {}
  • The strikethrough UI feature. It introduces the Strikethrough button.

property pluginName

static readonly pluginName: string;

method init

init: () => void;

class Subscript

class Subscript extends Plugin {}
  • The subscript feature.

    It loads the and plugins.

property pluginName

static readonly pluginName: string;

property requires

static readonly requires: readonly [typeof SubscriptEditing, typeof SubscriptUI];

class SubscriptEditing

class SubscriptEditing extends Plugin {}
  • The subscript editing feature.

    It registers the sub command and introduces the sub attribute in the model which renders to the view as a <sub> element.

property pluginName

static readonly pluginName: string;

method init

init: () => void;

class SubscriptUI

class SubscriptUI extends Plugin {}
  • The subscript UI feature. It introduces the Subscript button.

property pluginName

static readonly pluginName: string;

method init

init: () => void;

class Superscript

class Superscript extends Plugin {}
  • The superscript feature.

    It loads the and plugins.

property pluginName

static readonly pluginName: string;

property requires

static readonly requires: readonly [
typeof SuperscriptEditing,
typeof SuperscriptUI
];

class SuperscriptEditing

class SuperscriptEditing extends Plugin {}
  • The superscript editing feature.

    It registers the super command and introduces the super attribute in the model which renders to the view as a <super> element.

property pluginName

static readonly pluginName: string;

method init

init: () => void;

class SuperscriptUI

class SuperscriptUI extends Plugin {}
  • The superscript UI feature. It introduces the Superscript button.

property pluginName

static readonly pluginName: string;

method init

init: () => void;

class Underline

class Underline extends Plugin {}
  • The underline feature.

    For a detailed overview check the guide and the .

    This is a "glue" plugin which loads the and plugins.

property pluginName

static readonly pluginName: string;

property requires

static readonly requires: readonly [typeof UnderlineEditing, typeof UnderlineUI];

class UnderlineEditing

class UnderlineEditing extends Plugin {}
  • The underline editing feature.

    It registers the 'underline' command, the Ctrl+U keystroke and introduces the underline attribute in the model which renders to the view as an <u> element.

property pluginName

static readonly pluginName: string;

method init

init: () => void;

class UnderlineUI

class UnderlineUI extends Plugin {}
  • The underline UI feature. It introduces the Underline button.

property pluginName

static readonly pluginName: string;

method init

init: () => void;

Package Files (23)

Dependencies (1)

Dev Dependencies (0)

No dev dependencies.

Peer Dependencies (0)

No peer dependencies.

Badge

To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@ckeditor/ckeditor5-basic-styles.

  • Markdown
    [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@ckeditor/ckeditor5-basic-styles)
  • HTML
    <a href="https://www.jsdocs.io/package/@ckeditor/ckeditor5-basic-styles"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>