Constructor
new CommentSource(comment, signature, contextCode, isInSectionContext)
- Source:
Create a comment's source object.
Parameters:
Name | Type | Description |
---|---|---|
comment |
Comment | Comment. |
signature |
object | Data about the source code of the signature. |
contextCode |
string | Wikitext used as a reference point for the indexes. |
isInSectionContext |
boolean | Is the source code of the section (not page) used. |
Methods
modifyContext(options) → {object}
- Source:
Modify the code of a whole section or page related to the comment in accordance with an action.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
Properties
|
Throws:
Returns:
- Type
- object
toInput() → {string}
- Source:
Convert the comment's source code to code to set as a value of an input (practically, to the comment form's input).
Returns:
- Type
- string