Skip to main content

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 updated
  • cardId - (required) the ID of the card which comment to be updated
  • comment - (required) the configuration object of the comment to be updated. Here you can specify the following parameters:
    • id - (optional) the ID of the updated comment
    • cardId - (optional) the ID of the card, to which the updated comment to be added
    • text - (optional) the text of the updated comment
    • date - (optional) the date of the updated comment
    • html - (optional) the HTML markup of the updated comment. Enable the html property of the editorShape 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