updateComment()
Description
Modify a card comment by specifying its ID
Usage
updateComment({
id?: string | number,
cardId: string | number,
comment: {
id?: string | number,
cardId?: string | number,
text?: string,
date?: Date,
html?: string
}
}): void;
Parameters
id
- (optional) the identifier of the comment to be modifiedcardId
- (required) the identifier of the card containing the comment to updatecomment
- (required) an object describing the updated comment details. It can include:id
- (optional) the identifier of the comment being updatedcardId
- (optional) the identifier of the card where the updated comment will be placedtext
- (optional) the new text content of the commentdate
- (optional) the new date associated with the commenthtml
- (optional) the new HTML content for the comment. To display HTML instead of plain text, enable thehtml
property in theeditorShape
configuration
Example
// create Kanban
const board = new kanban.Kanban("#root", {
columns,
cards
});
// update comment
board.updateComment({
id: 1,
cardId: 1,
comment: {
id: 2,
cardId: 4,
text: "",
date: new Date("01/08/2021"),
html: "<b>Updated comment</b>"
}
});
Change log: This method was introduced in version 1.4