Monaco Editor URI use case?

Viewed 572

Hi I'm trying out the Monaco editor and have noticed that some parts of the API ask for an optional URI or path. Examples:

The URI object documentation doesnt appear to have much info as to what its role in the editor is. Can anyone shed any light on to the use case of URIs in monaco. It seems like an option to provide content is always provided / required (so it doesnt seem to be dynamically reading from the provided URI).

Thanks!

1 Answers

I also wondered myself and the best guess I have is that these URIs are stored internally to find a resource (mostly models) by that value. Usually you don't need that, but some functionality only takes a URI, which internally is used to lookup a model, I think.

Related