export pdf ok
This commit is contained in:
app
conf
public
@ -1,7 +1,3 @@
|
||||
@font-face {
|
||||
font-family: Si;
|
||||
src: url("/public/fonts/MSYH.TTF");
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
font-style: normal;
|
||||
@ -28,14 +24,14 @@
|
||||
}
|
||||
*,
|
||||
body {
|
||||
font-family: Si, 'Microsoft YaHei', 'WenQuanYi Micro Hei', 'Helvetica Neue', Arial, 'Hiragino Sans GB';
|
||||
font-family: 'Microsoft YaHei', 'WenQuanYi Micro Hei', 'Helvetica Neue', Arial, 'Hiragino Sans GB';
|
||||
font-weight: 300;
|
||||
font-size: 14px;
|
||||
}
|
||||
h1,
|
||||
h2,
|
||||
h3 {
|
||||
font-family: Si, 'Microsoft YaHei', 'WenQuanYi Micro Hei', 'Helvetica Neue', Arial, 'Hiragino Sans GB';
|
||||
font-family: 'Microsoft YaHei', 'WenQuanYi Micro Hei', 'Helvetica Neue', Arial, 'Hiragino Sans GB';
|
||||
}
|
||||
* {
|
||||
font-size: 16px;
|
@ -1,8 +1,3 @@
|
||||
@font-face {
|
||||
font-family: Si;
|
||||
src:url("/public/fonts/MSYH.TTF");
|
||||
}
|
||||
|
||||
// font
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
@ -31,7 +26,7 @@
|
||||
|
||||
@bgColor: #fff;
|
||||
@headerBgColor: #fff;
|
||||
@fontFamily: Si, 'Microsoft YaHei','WenQuanYi Micro Hei','Helvetica Neue',Arial,'Hiragino Sans GB';
|
||||
@fontFamily: 'Microsoft YaHei','WenQuanYi Micro Hei','Helvetica Neue',Arial,'Hiragino Sans GB';
|
||||
@green: #65bd77;
|
||||
|
||||
*, body {
|
@ -1096,6 +1096,12 @@ Note.download = function(url, params) {
|
||||
$('<form target="mdImageManager" action="' + url + '" method="GET">' + inputs + '</form>').appendTo('body').submit().remove();
|
||||
};
|
||||
|
||||
// 导出成PDF
|
||||
Note.exportPDF = function(target) {
|
||||
var noteId = $(target).attr("noteId");
|
||||
$('<form target="mdImageManager" action="/note/exportPdf" method="GET"><input name="noteId" value="' + noteId + '"/></form>').appendTo('body').submit().remove();
|
||||
};
|
||||
|
||||
//--------------
|
||||
// read only
|
||||
|
||||
@ -1406,7 +1412,6 @@ Note.toggleReadOnly = function() {
|
||||
}
|
||||
|
||||
note.readOnly = true;
|
||||
Note.readOnly = true;
|
||||
};
|
||||
// 切换到编辑模式
|
||||
LEA.toggleWriteable = Note.toggleWriteable = function() {
|
||||
@ -1505,6 +1510,9 @@ Note.initContextmenu = function() {
|
||||
{ text: getMsg("publicAsBlog"), alias: 'set2Blog', faIcon: "fa-bold", action: Note.setNote2Blog },
|
||||
{ text: getMsg("cancelPublic"), alias: 'unset2Blog', faIcon: "fa-undo", action: Note.setNote2Blog },
|
||||
{ type: "splitLine" },
|
||||
// { text: "分享到社区", alias: 'html2Image', icon: "", action: Note.html2Image},
|
||||
{ text: getMsg("exportPdf"), alias: 'exportPDF', faIcon: "fa-file-pdf-o", action: Note.exportPDF},
|
||||
{ type: "splitLine" },
|
||||
{ text: getMsg("delete"), icon: "", faIcon: "fa-trash-o", action: Note.deleteNote },
|
||||
{ text: getMsg("move"), alias: "move", faIcon: "fa-arrow-right",
|
||||
type: "group",
|
||||
|
632
public/libs/md2html/md2html_for_export.js
Normal file
632
public/libs/md2html/md2html_for_export.js
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user