diff options
| author | Shulhan <ms@kilabit.info> | 2021-08-29 14:50:55 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2021-08-29 14:50:55 +0700 |
| commit | b72a7d013229c7879f3bcc09b7d9e6bc0f3339f4 (patch) | |
| tree | 53b3045980fbd1b0eb2f961ce54261c6c551cfed /editor/editor.ts | |
| parent | 1364ab29de697993bc34832cf77d4e99ee037223 (diff) | |
| download | pakakeh.ts-b72a7d013229c7879f3bcc09b7d9e6bc0f3339f4.tar.xz | |
editor: always decode the node content from base64
Diffstat (limited to 'editor/editor.ts')
| -rw-r--r-- | editor/editor.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/editor/editor.ts b/editor/editor.ts index 8f175ac..e8883c4 100644 --- a/editor/editor.ts +++ b/editor/editor.ts @@ -333,10 +333,12 @@ export class WuiEditor { } } + // Open the node for editing. + // The content MUST be encoded in base64. Open(node: WuiVfsNodeInterface): void { this.active_file = node - let content = node.content as string + let content = atob(node.content || "") content = content.replace("\r\n", "\n") this.raw_lines = content.split("\n") |
