Skip to content
This repository has been archived by the owner on Oct 17, 2021. It is now read-only.

ContainerOfInlineElements

mattt edited this page Feb 7, 2020 · 11 revisions

Children.CMarkNodeChildIterator.ContainerOfBlocks.Document.BlockQuote.ContainerOfBlocks.ContainerOfInlineElements

public protocol ContainerOfInlineElements: Node

Inheritance

Children.CMarkNodeChildIterator.ContainerOfBlocks, Node

Requirements

prepend(child:)

Adds an inline element to the beginning of the block's children.

@discardableResult public func prepend(child: Inline & Node) -> Bool

Parameters

  • child: The inline element to add.

Returns

true if successful, otherwise false.

insert(child:before:)

Inserts a node to the list item's children before a specified sibling.

@discardableResult public func insert(child: Node, before sibling: Node) -> Bool

Parameters

  • child: The block to add.
  • sibling: The child before which the block is added

Returns

true if successful, otherwise false.

append(child:)

Adds an inline element to the end of the block's children.

@discardableResult public func append(child: Inline & Node) -> Bool

Parameters

  • child: The inline element to add.

Returns

true if successful, otherwise false.

remove(child:)

Removes an inline element from the block's children.

@discardableResult public func remove(child: Inline & Node) -> Bool

Parameters

  • child: The inline element to remove.

Returns

true if successful, otherwise false.

insert(child:after:)

Inserts a block to the block's children after a specified sibling.

@discardableResult public func insert(child: Item, after sibling: Item) -> Bool

Parameters

  • child: The block to add.
  • sibling: The child after which the block is added

Returns

true if successful, otherwise false.

insert(child:before:)

Inserts a block to the block's children before a specified sibling.

@discardableResult public func insert(child: Item, before sibling: Item) -> Bool

Parameters

  • child: The block to add.
  • sibling: The child before which the block is added

Returns

true if successful, otherwise false.

append(child:)

Adds a block to the end of the block's children.

@discardableResult public func append(child: Item) -> Bool

Parameters

  • child: The block to add.

Returns

true if successful, otherwise false.

remove(child:)

Removes a node from the list item's children.

@discardableResult public func remove(child: Node) -> Bool

Parameters

  • child: The block to remove.

Returns

true if successful, otherwise false.

children

The list item's children.

var children: [Node]

append(child:)

Adds a node to the end of the list item's children.

@discardableResult public func append(child: Node) -> Bool

Parameters

  • child: The block to add.

Returns

true if successful, otherwise false.

prepend(child:)

Adds a block to the beginning of the block's children.

@discardableResult public func prepend(child: Item) -> Bool

Parameters

  • child: The block to add.

Returns

true if successful, otherwise false.

prepend(child:)

Adds a node to the beginning of the list item's children.

@discardableResult public func prepend(child: Node) -> Bool

Parameters

  • child: The block to add.

Returns

true if successful, otherwise false.

remove(child:)

Removes a block from the block's children.

@discardableResult public func remove(child: Item) -> Bool

Parameters

  • child: The block to remove.

Returns

true if successful, otherwise false.

insert(child:after:)

Inserts an inline element to the block's children after a specified sibling.

@discardableResult public func insert(child: Inline & Node, after sibling: Inline & Node) -> Bool

Parameters

  • child: The inline element to add.
  • sibling: The child after which the inline element is added

Returns

true if successful, otherwise false.

children

The block's children.

var children: [Inline & Node]

insert(child:before:)

Inserts an inline element to the block's children before a specified sibling.

@discardableResult public func insert(child: Inline & Node, before sibling: Inline & Node) -> Bool

Parameters

  • child: The inline element to add.
  • sibling: The child before which the inline element is added

Returns

true if successful, otherwise false.

children

The block's children.

var children: [Item]

insert(child:after:)

Inserts a node to the list item's children after a specified sibling.

@discardableResult public func insert(child: Node, after sibling: Node) -> Bool

Parameters

  • child: The block to add.
  • sibling: The child after which the block is added

Returns

true if successful, otherwise false.

Clone this wiki locally