<!-- Do not edit this file. It is automatically generated by API Documenter. --> [`TextFileView`](TextFileView) › [`clear`](TextFileView/clear) ## TextFileView.clear() method Clear the editor. This is usually called when we're about to open a completely different file, so it's best to clear any editor states like undo-redo history, and any caches/indexes associated with the previous file contents. 0.10.12 **Signature:** ```typescript abstract clear(): void; ``` **Returns:** `void`