openInlineEditor()
Description
Opens the inline editor of a task/project
Usage
openInlineEditor({
id: string | number,
type?: "task" | "project"
}): void;
Parameters
id
- (required) the id of a task/projecttype
- (optional) the type of an item: "task" (by default) or "project"
Example
const { ToDo, Toolbar } = todo;
const list = new ToDo("#root", {
tasks: [
{ id: "1", text: "Task 1 #tag1" },
{ id: "1.1", text: "Task 1.1", parent: "1" },
{ id: "1.1.1", text: "Task 1.1.1", parent: "1.1" },
{ id: "1.2", text: "Task 1.2", parent: "1" },
]
});
const toolbar = new Toolbar("#toolbar", {
api: list.api,
});
// open inline editor of the task
list.openInlineEditor({
id: "1.1.1",
});
Related article: Inline editing