Skip to content

DocumentColorProvider

原文链接

https://microsoft.github.io/monaco-editor/docs.html#interfaces/languages.DocumentColorProvider.html

编辑器模型的颜色提供程序。

ts
interface DocumentColorProvider {
    provideColorPresentations(model, colorInfo, token): ProviderResult<IColorPresentation[]>;
    provideDocumentColors(model, token): ProviderResult<IColorInformation[]>;
}

provideColorPresentations

provideDocumentColors