Edit this topic

Text part

: shell

: text-part-handler

: core-parts

: /modules/core/parts/services/text-part.js

: https://github.com/DecentCMS/DecentCMS/blob/master/modules/core/parts/services/text-part.js

TextPart

The text part handler creates text shapes. The flavor of the text can be inferred from the extension on a path property on the part if it exist.

TextPart.handle(context, done)

Adds a text shape to context.shapes for the text part on the context.

Param Type Description
context object The context object.
context.part object The text part to handle.
context.partName string The name of the part.
context.displayType string The display type.
context.item object A reference to the content item.
context.shapes Array The shapes array to which new shapes must be pushed.
context.scope object The scope.
done function The callback.