# Advice for partly read-only nodes

**URL:** <https://discuss.prosemirror.net/t/advice-for-partly-read-only-nodes/4630>\
**Category:** Uncategorized\
**Created:** [May 22, 2022, 12:21pm UTC](https://discuss.prosemirror.net/t/advice-for-partly-read-only-nodes/4630 "2022-05-22T12:21:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tslocke](https://discuss.prosemirror.net/user_avatar/discuss.prosemirror.net/tslocke/32/2218_2.png) [@tslocke](https://discuss.prosemirror.net/u/tslocke)\
**Post date:** [May 22, 2022, 12:21pm UTC](https://discuss.prosemirror.net/t/advice-for-partly-read-only-nodes/4630/1 "2022-05-22T12:21:33Z")

</div>

Say I have a bullet list, and I want to prevent any edits to the list, but each list item can potentially have extra content, after the one initial paragraph, and this _will_ be editable. So no adding/removing/reordering items, and no editing that first para in each list item.

Any advice on the best way to achieve this?

I have it working now, using a `readonly` attribute on the list, the items, and the first paragraphs, and a plugin with `filterTransaction`. If I detect the transaction touches a node with `n.attrs.readOnly`, I veto it.

It works but it has some issues around undo. I could describe the specific issues, but they are a bit complicated. I’m wondering if there is a different approach that would be more suitable.

---

<div class="post-metadata">

**Author:** ![marijn](https://discuss.prosemirror.net/user_avatar/discuss.prosemirror.net/marijn/32/15_2.png) [@marijn](https://discuss.prosemirror.net/u/marijn)\
**Post date:** [May 22, 2022, 12:44pm UTC](https://discuss.prosemirror.net/t/advice-for-partly-read-only-nodes/4630/2 "2022-05-22T12:44:59Z")

</div>

`filterTransaction` and the undo history should work together unproblematically. If you find a specific situation where they don’t, please report it as a bug.

---

<div class="post-metadata">

**Author:** ![tslocke](https://discuss.prosemirror.net/user_avatar/discuss.prosemirror.net/tslocke/32/2218_2.png) [@tslocke](https://discuss.prosemirror.net/u/tslocke)\
**Post date:** [May 22, 2022, 1:24pm UTC](https://discuss.prosemirror.net/t/advice-for-partly-read-only-nodes/4630/3 "2022-05-22T13:24:46Z")

</div>

Undo bug was on me and unrelated.
