TextFileView.setViewData method
TextFileView › setViewData
Official
Set the data to the editor. This is used to load the file contents.If
clear is set, then it means we're opening a completely different file. In that case, you should call TextFileView.clear(), or implement a slightly more efficient clearing mechanism given the new data to be set. Signature:
setViewData(data: string, clear: boolean): voidParameters:
| Parameter | Type | Description |
|---|---|---|
| data | string | The data to set. |
| clear | boolean | Whether to clear the file. |
Returns: void
Since: 0.10.12