Add encoding getter and setter
Add TextEditor::onDidChangeEncoding