Converting a Node to a Mark in Tiptap and adding text before and after
I’m currently working on a project where I’m using Tiptap, and I’m trying to convert a Node into a Mark. The goal is to have the ability to write text before and after this node. I’ve attached the current code below.
Is there a way to setContent within the editor within a particular element?
I am using setContent, but it replaces everything within the editor. I only want to update the content in a particular location within the editor. Currently I have it hooking into the editor with an onChange event that runs the setContent command, and pass in state variables. This works but the problem is that once I introduce a new variable to update, I have to pass in all of the elements over again, and manage them that way. So my command looks like