Multiple view of the same atom-text-editor


I’m trying to create a package that partly involves displaying multiple atom-text-editor s on one same pane. A user can put a atom-text-editor of an existing text editor on that pane, which involves using a package command, that command does these:

var textEditor = atom.workspace.getActiveTextEditor();
var textEditorContent = textEditor.getText();
var bubble = document.createElement('atom-text-editor');
var model = bubble.getModel();



I clicked submit by accident, let me continue the question with a reply:
…and lastly I append the “bubble” variable to the root element.

What can I do, so that editing a text editor on the package pane will also trigger a change in the original active text editor?


I’d look at how the command Pane: Split Right does it. When you have the same file open in both panes, the changes should be synced.