Variable utilityConst

utility: {
    addFileProtocol: ((filePath, vscodePreviewPanel?) => string);
    getCrossnoteBuildDirectory: (() => string);
    openFile: ((filePath) => undefined | ChildProcess);
    setCrossnoteBuildDirectory: ((path) => void);
    uploadImage: ((imageFilePath, __namedParameters) => Promise<string>);
    useExternalAddFileProtocolFunction: ((func) => void);
} = ...

Type declaration

  • addFileProtocol: ((filePath, vscodePreviewPanel?) => string)
      • (filePath, vscodePreviewPanel?): string
      • Add file:/// to file path If it's for VSCode preview, add vscode-resource:/// to file path

        Parameters

        • filePath: string
        • Optional vscodePreviewPanel: null | WebviewPanel

        Returns string

  • getCrossnoteBuildDirectory: (() => string)
      • (): string
      • Get the directory path of this npm package with the following directory structure: You can use the setCrossnoteBuildDirectory function to set the directory path.

         out
        ├── cjs
        ├── dependencies
        ├── esm
        ├── styles
        ├── types
        └── webview

        Returns string

  • openFile: ((filePath) => undefined | ChildProcess)
      • (filePath): undefined | ChildProcess
      • open html file in browser or open pdf file in reader ... etc

        Parameters

        • filePath: string

        Returns undefined | ChildProcess

  • setCrossnoteBuildDirectory: ((path) => void)
      • (path): void
      • Parameters

        • path: string

        Returns void

  • uploadImage: ((imageFilePath, __namedParameters) => Promise<string>)
      • (imageFilePath, __namedParameters): Promise<string>
      • Upload image

        Parameters

        • imageFilePath: string
        • __namedParameters: {
              method: undefined | string;
              qiniu: undefined | {
                  AccessKey: string;
                  Bucket: string;
                  Domain: string;
                  SecretKey: string;
              };
          }
          • method: undefined | string
          • qiniu: undefined | {
                AccessKey: string;
                Bucket: string;
                Domain: string;
                SecretKey: string;
            }

        Returns Promise<string>

  • useExternalAddFileProtocolFunction: ((func) => void)
      • (func): void
      • Parameters

        • func: ((filePath, vscodePreviewPanel?) => string)
            • (filePath, vscodePreviewPanel?): string
            • Parameters

              • filePath: string
              • Optional vscodePreviewPanel: null | WebviewPanel

              Returns string

        Returns void

Generated using TypeDoc