1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-23 16:55:23 +01:00
slate/docs/reference/models/character.md
Somasundaram Ayyappan b5880e607f Doc fixes (#102)
* replace block api refs with inline

* fix inline link refs in static method sections

* link fixes in few more files
2016-07-17 14:00:31 -07:00

930 B

Character

import { Character } from 'slate'

A character in a Text node.

Characters are how Slate associates Marks with a range of text, for formatting.

Properties

Character({
  marks: Immutable.Set<Mark>,
  text: String
})

marks

Immutable.Set

A set of Marks attached to the character.

text

String

The text string of the character.

Static Methods

Character.create

Character.create(properties: Object) => Character

Create a character from a plain Javascript object of properties.

Character.createList

Character.createList(array: Array) => List

Create a list of characters from a plain Javascript array.