Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix output background #498

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions dist/cherry-markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -52972,6 +52972,9 @@
}
});
};



/**
* 将预览区域的内容放在body上准备后续导出操作
* @param {HTMLElement} previeweDom 预览区域的dom
Expand All @@ -52989,12 +52992,45 @@
document.body.appendChild(cherryWrapper);
var bodyOverflow = document.body.style.overflow;
document.body.style.overflow = 'visible';
/**
* 修改背景颜色问题
* @param {HTMLElement} cherryPreviewer 预览区域的dom
*/
var setnewpreviewer=function changebackground(cherryPreviewer){
var x=getThemeFromLocal();
var color;
switch(x){
case 'default':
color="#f8fafb";
break;
case 'dark':
color="#333333";
break;
case 'light':
color="#ffffff";
break;
case 'green':
color="#ebfbee"
break;
case 'red':
color="#fff0f6"
break;
defalut:
color="#f8fafb";
break;
}
cherryPreviewer.style.backgroundColor=color;
setnewpreviewer=cherryPreviewer;
}
cherryPreviewer=setnewpreviewer(cherryPreviewer);
cb(cherryPreviewer, function () {
cherryWrapper.remove();
undoHideBodyChildren(displayList);
document.body.style.overflow = bodyOverflow;
});
};


/**
* 下载文件
* @param {String} downloadUrl 图片本地地址
Expand Down