|
@@ -435,6 +435,7 @@ interface IHljs {
|
|
|
enable?: boolean;
|
|
|
/** 自定义指定语言: CODE_LANGUAGES */
|
|
|
langs?: string[];
|
|
|
+
|
|
|
/** 渲染右上角菜单按钮 */
|
|
|
renderMenu?(element: HTMLElement, menuElement: HTMLElement): void;
|
|
|
}
|
|
@@ -501,7 +502,7 @@ interface IPreview {
|
|
|
theme?: IPreviewTheme;
|
|
|
/** @link https://ld246.com/article/1549638745630#options-preview-actions */
|
|
|
actions?: Array<IPreviewAction | IPreviewActionCustom>;
|
|
|
-
|
|
|
+ render?: IPreviewRender
|
|
|
/** 预览回调 */
|
|
|
parse?(element: HTMLElement): void;
|
|
|
|
|
@@ -509,6 +510,12 @@ interface IPreview {
|
|
|
transform?(html: string): string;
|
|
|
}
|
|
|
|
|
|
+interface IPreviewRender {
|
|
|
+ media?: {
|
|
|
+ enable?: boolean;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
type IPreviewAction = "desktop" | "tablet" | "mobile" | "mp-wechat" | "zhihu";
|
|
|
|
|
|
interface IPreviewActionCustom {
|
|
@@ -542,6 +549,7 @@ interface IPreviewOptions {
|
|
|
renderers?: ILuteRender;
|
|
|
theme?: IPreviewTheme;
|
|
|
icon?: "ant" | "material" | undefined;
|
|
|
+ render?: IPreviewRender
|
|
|
|
|
|
transform?(html: string): string;
|
|
|
|