CM6 changes editable mode at runtime

After I started the CM6 editor in editable mode, how do I set editable to false at runtime?

const view = new EditorVIew({
  state: EditorState.create({
    extensions: [ EditorView.editable.of(true) ]

// I only found the api to read a facet at runtime. How to change/add a facet?

Check out the section on Compartments.

1 Like