public function before($content) { $offset = $this->index(); $parent = $this->parent; $nodes = $this->createNodes($content); foreach ($nodes as $node) { $node->changeParent($parent, $offset); } return $this; }