# Is there a way to add a default mark to a node?

**URL:** https://discuss.prosemirror.net/t/is-there-a-way-to-add-a-default-mark-to-a-node/6528
**Category:** Uncategorized
**Created:** [June 27, 2024, 4:20am UTC](https://discuss.prosemirror.net/t/is-there-a-way-to-add-a-default-mark-to-a-node/6528 "2024-06-27T04:20:11Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ElHex](https://discuss.prosemirror.net/user_avatar/discuss.prosemirror.net/elhex/32/3237_2.png) [@ElHex](https://discuss.prosemirror.net/u/ElHex)
#### Post date: [June 27, 2024, 4:20am UTC](https://discuss.prosemirror.net/t/is-there-a-way-to-add-a-default-mark-to-a-node/6528/1 "2024-06-27T04:20:11Z")

</div>

Hi, I’ve been trying to add a default mark to a custom node I’m creating but I don’t see a way to do it by default but using “commands”

also I wish to add a default mark to every text node (wrapping the text node) is that possible?

many thanks for the help.

---

<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: [June 27, 2024, 6:27am UTC](https://discuss.prosemirror.net/t/is-there-a-way-to-add-a-default-mark-to-a-node/6528/2 "2024-06-27T06:27:26Z")

</div>

An `appendTransaction` hook could do something like this, by ensuring newly added nodes get the appropriate marks.

---

<div class="post-metadata">

### Author: ![ElHex](https://discuss.prosemirror.net/user_avatar/discuss.prosemirror.net/elhex/32/3237_2.png) [@ElHex](https://discuss.prosemirror.net/u/ElHex)
#### Post date: [June 28, 2024, 7:08pm UTC](https://discuss.prosemirror.net/t/is-there-a-way-to-add-a-default-mark-to-a-node/6528/3 "2024-06-28T19:08:48Z")

</div>

I just did a test on this, it works great! many thanks, but It does not apply when pasting text, I believe I must modify the pasted content using the events right?
