BlockEmbed class

An object which occupies an entire line in a document and cannot co-exist inline with regular text.

Examples of block embeds include horizontal rule, an image or a map view.

There are two built-en embed types supported by Notus documents, however the document model itself does not make any assumptions about the types of embedded objects and allows users to define their own types.

It is also allowed to re-define the built-in embed types (horizontal rule and image) entirely. However if used with Zefyr editor this change may require extending Zefyr to recognize the new data attached to those embed types. See documentation on working with embeds in Zefyr for more details.

Inheritance

Constructors

BlockEmbed(String type, {Map<String, dynamic> data = const {}})
Creates a new block embed of specified type and containing data.

Properties

data Map<String, dynamic>
The data payload of this object.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
inline bool
If set to true then this object can be embedded inline with regular text, otherwise it occupies an entire line.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type String
The type of this object.
finalinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator.
inherited

Static Properties

horizontalRule BlockEmbed
final

Static Methods

image(String source) BlockEmbed