Can two textareas share input events instead of copying on each event?

Is there a way to link two textarea elements to the same native input events?

I want to be able to link two textarea elements together so they behave like a split view of the same file in a text editor, where changes made in one textarea are reflected in the other. I know that I can set the value of one to that of the other, and I’ve read that this can be done with a pseudo element as described in this article. However, this method appears to rewrite the entire string from the “active” textarea to the “copy” textarea on each key event. Is there a way to just link them without rewriting the entire string?

No, there is no way to link two textarea elements together without rewriting the entire string.