State selection in contenteditable is false

There are two goals I need to complete.

  1. The editor has to be read-only (disabled or uneditable)

  2. But The user can write comment on document. (using by annotation deco plugin. I built this from the example collab-demo’s comment plugin)

Here are my problems.

  1. The “state.selection” is always empty on contenteditable is false. so calling deco-plugin is failed. The plugin need that from-to position. How can i activate “state.selection” on “contenteditable is false” ? is it possible?

  2. Is there any other way of this situation? no editable but The selection of state and plugin has to working. If I forgive to set false to content-editable. then what kind of way may possible?

  3. Can i banned transaction from only document editing? While Other transaction is working on normally.

Any advise or guidance would be greatly appreciated…!!.

Thanks (and sorry for my English)

When you have a DOM selection inside the editor, it should update its selection state to match that even in uneditable mode. I just quickly tested this and it appears to still be working.