TextEditor & TextEditorView?


#1

The Documentation for TextEditor says:

This class represents all essential editing state for a single TextBuffer, including cursor and selection positions, folds, and soft wraps. If you’re manipulating the state of an editor, use this class. If you’re interested in the visual appearance of editors, use TextEditorView instead.

That link to TextEditorView is dead (404’s). The source indicates that this class is deprecated? What’s the preferred way to insert a text editor of some sort as a UI element?

Context: I want a password input field that looks like the thing I see when I do:

this.subview('password', new TextEditorView({
  mini: true,
  placeholderText: 'Password',
});

… except that I want the characters to be displayed as asterisks. I was thinking of creating perhaps a PasswordTextEditorView, but I’m at a loss on how to do that.

Furthermore, if I just subclass TextEditorView by doing …

class PasswordTextEditorView extends TextEditorView {
  static content() {
    return TextEditorView.content();
    // also tried `super.content();`
  }
}

and try to use that class in place of the TextEditorView, I don’t see any UI component rendered.