From 0cd866bcd4449528d17d33455bea3a63e2853ad5 Mon Sep 17 00:00:00 2001 From: Jocs Date: Mon, 23 Apr 2018 21:48:07 +0800 Subject: [PATCH] fix:PDF Export is contacted by LaTeX hightlight #194 --- .github/CHANGELOG.md | 4 +++- src/editor/utils/exportStyledHTML.js | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index f80e4635..6d059613 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -1,4 +1,4 @@ -### 0.11.14 +### 0.11.16 **:cactus:Feature** @@ -22,6 +22,8 @@ - fix #198 navigation in table - fix: #190 Delete user settings on uninstall (NSIS) (#203) - Felix Häusler - fix: html block style error when active - Jocs +- fix: PDF Export is contacted by LaTeX hightlight #194 +- fix: Table inside a list is not supported #202 ### 0.10.21 diff --git a/src/editor/utils/exportStyledHTML.js b/src/editor/utils/exportStyledHTML.js index 5111b3fb..00319523 100644 --- a/src/editor/utils/exportStyledHTML.js +++ b/src/editor/utils/exportStyledHTML.js @@ -35,6 +35,13 @@ class ExportHTML { .dark hr { background-color: #545454; } + .ag-hide.ag-math > .ag-math-render { + top: 0; + position: relative; + padding: 0; + color: #000; + background: transparent; + } @@ -186,6 +193,15 @@ class ExportHTML { anchor.attr('target', '_blank') }) } + // hide math preview bubble + const mathes = $(`span.${CLASS_OR_ID['AG_MATH']}`) + mathes.each((i, m) => { + const math = $(m) + if (math.hasClass(CLASS_OR_ID['AG_GRAY'])) { + math.removeClass(CLASS_OR_ID['AG_GRAY']) + math.addClass(CLASS_OR_ID['AG_HIDE']) + } + }) // soft line break render to html is a space, and hard line break render to html is `
` const paragraphs = $(`p.${CLASS_OR_ID['AG_PARAGRAPH']}`) if (paragraphs.length) {