Skip to main content

Read-only mode

To make the To Do List read-only, set the readonly configuration property to true. The example below initializes the To Do List in read-only mode:

const { ToDo, Toolbar } = todo;

// create To Do List
const list = new ToDo("#root", {
tasks,
users,
projects,
readonly: true
});

const toolbar = new Toolbar("#toolbar", {
api: list.api,
});
info

In this mode, tasks are non-editable. Users can only select a task and mark it as complete or incomplete.

Example

The live snippet below demonstrates the read-only mode: