updateComment()
Description
Update 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 to be updatedcardId
- (required) the ID of the card which comment to be updatedcomment
- (required) the configuration object of the comment to be updated. Here you can specify the following parameters:id
- (optional) the ID of the updated commentcardId
- (optional) the ID of the card, to which the updated comment to be addedtext
- (optional) the text of the updated commentdate
- (optional) the date of the updated commenthtml
- (optional) the HTML markup of the updated comment. Enable thehtml
property of theeditorShape
config, to display the HTML markup instead of text
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: The method was added in v1.4