| 227 | } |
| 228 | |
| 229 | public run(onLoad, editorText, currentLanguage: Language) { |
| 230 | this.initializeIfNeeded(); |
| 231 | this.populateLocalStorage(); |
| 232 | this.setMinimalOptions(editorText, currentLanguage); |
| 233 | this.populateLocalHistory(); |
| 234 | this.onLoadCallback = onLoad; |
| 235 | unwrap(this.modal).find('.local-file').attr('accept', currentLanguage.extensions.join(',')); |
| 236 | this.populateBuiltins().then(() => { |
| 237 | if (this.modal) { |
| 238 | BootstrapUtils.showModal(this.modal); |
| 239 | } |
| 240 | }); |
| 241 | } |
| 242 | |
| 243 | private onSaveToBrowserStorage() { |
| 244 | const saveNameValue = unwrapString(this.modal?.find('.save-name').val()); |