0

im new to asking in stackoverflow but here is my my problem im trying to implement a text editor that loads xml files from my pc and then edit them and save the files into the originals ive searched a lot and found the monaco editor but my problem is im trying to load my file into the monaco editor and im kinda stuck

1 Answers1

1

You are probably using Monaco in a web page, right? So, you are limited by what the Web browser allows. It will never give you a full file name, but you can let the user pick a file, for which you get a file handle to load its content and you can use the download feature of the browser, to write the file to disk. But this will never be the original file (unless the user picked that from his/her download folder).

That means using monaco-editor as a general purpose text editor is probably not working well, unless you embed it in a native frame (like vscode does) to do the real file work for you.

Mike Lischke
  • 48,925
  • 16
  • 119
  • 181
  • so my quetion is is there a way to load my xml file on the monaco editor or is it impossible with the editor cuz ive been searching for 5 hours trying things and nothing work – BEDOUI Hamza Aug 30 '21 at 17:47