Theia API Documentation v1.65.0
    Preparing search index...

    Implements

    Index

    Constructors

    Accessors

    • get baseUri(): undefined | Uri

      Uri that relative paths are resolved relative to.

      If the baseUri ends with /, it is considered a directory and relative paths in the markdown are resolved relative to that directory:

      const md = new vscode.MarkdownString(`[link](./file.js)`);
      md.baseUri = vscode.Uri.file('/path/to/dir/');
      // Here 'link' in the rendered markdown resolves to '/path/to/dir/file.js'

      If the baseUri is a file, relative paths in the markdown are resolved relative to the parent dir of that file:

      const md = new vscode.MarkdownString(`[link](./file.js)`);
      md.baseUri = vscode.Uri.file('/path/to/otherFile.js');
      // Here 'link' in the rendered markdown resolves to '/path/to/file.js'

      Returns undefined | Uri

    • set baseUri(value: undefined | Uri): void

      Uri that relative paths are resolved relative to.

      If the baseUri ends with /, it is considered a directory and relative paths in the markdown are resolved relative to that directory:

      const md = new vscode.MarkdownString(`[link](./file.js)`);
      md.baseUri = vscode.Uri.file('/path/to/dir/');
      // Here 'link' in the rendered markdown resolves to '/path/to/dir/file.js'

      If the baseUri is a file, relative paths in the markdown are resolved relative to the parent dir of that file:

      const md = new vscode.MarkdownString(`[link](./file.js)`);
      md.baseUri = vscode.Uri.file('/path/to/otherFile.js');
      // Here 'link' in the rendered markdown resolves to '/path/to/file.js'

      Parameters

      • value: undefined | Uri

      Returns void

    Methods