简体   繁体   English

摩纳哥编辑器 URI 用例?

[英]Monaco Editor URI use case?

Hi I'm trying out the Monaco editor and have noticed that some parts of the API ask for an optional URI or path.嗨,我正在试用 Monaco 编辑器,并注意到 API 的某些部分要求提供可选的 URI 或路径。 Examples:例子:

The URI object documentation doesnt appear to have much info as to what its role in the editor is. URI object 文档似乎没有太多关于它在编辑器中的作用的信息。 Can anyone shed any light on to the use case of URIs in monaco.任何人都可以对摩纳哥的 URI 用例有所了解吗? It seems like an option to provide content is always provided / required (so it doesnt seem to be dynamically reading from the provided URI).似乎始终提供/需要提供内容的选项(因此它似乎不是从提供的 URI 动态读取)。

Thanks!谢谢!

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.我也想知道自己,我最好的猜测是这些 URI 存储在内部以通过该值查找资源(主要是模型)。 Usually you don't need that, but some functionality only takes a URI, which internally is used to lookup a model, I think.通常你不需要那个,但有些功能只需要一个 URI,我认为它在内部用于查找 model。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM