Add `TextEditorElement` methods needed to replace deprecated APIs

In order to avoid using deprecated APIs, the wrap-guide package needs to be able to:
* perform adjustments when a text editor element is attached to the DOM
* know a text editor element's default character width