updateComment()
Description
Modify a card comment by 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 ID of the comment that needs to be updatedcardId- (required) the ID of the card containing the comment to updatecomment- (required) an object defining the updated comment details. This can include:id- (optional) the ID of the comment being updatedcardId- (optional) the ID of the card where the updated comment will be placedtext- (optional) the new text content of the commentdate- (optional) the date associated with the updated commenthtml- (optional) the HTML content for the updated comment. To show HTML instead of plain text, make sure thehtmlproperty is enabled in theeditorShapeconfiguration
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