after
The after method inserts content after the closing tag of the element.
Syntax
element.after(content);
element.after(content, options);
Parameters
content: string- The content to insert after the element's closing tag.
options: ElementRewriterOptions- An optional object that can have the following properties:
escapeHTML: boolean- If
true, any HTML markup incontentwill be escaped so it is safe to insert as text.
- If
- An optional object that can have the following properties:
Examples
// Assuming `e` is an Element representing <div>Hello</div>
e.after("World");
// Result: <div>Hello</div>World