diff --git a/README.md b/README.md index ca2b81c1..61a6111d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,39 @@ ## CuteMarkEd +### fork version description +1. build in MacOS +2. plan to merge huaxz1986's patch +https://github.com/huaxz1986/CuteMarkEd + +#### MacOS build steps: + +https://github.com/cloose/CuteMarkEd/wiki/Build-Instructions#mac-os-x +- install QT 5.5.1 in /opt/local/ +http://download.qt.io/official_releases/qt/5.5/5.5.1/qt-opensource-mac-x64-clang-5.5.1.dmg +``` +brew install hunspell discount +ln -s /usr/local/lib/libhunspell-1.4.a /usr/local/lib/libhunspell.a +lrelease app/translations/cutemarked_de.ts -qm app/translations/cutemarked_de.qm +lrelease app/translations/cutemarked_cs.ts -qm app/translations/cutemarked_cs.qm +/opt/local/qt5.5.1/5.5/clang_64/bin/qmake CuteMarkEd.pro +make +``` +copy CuteMarkEd to /Applications + + + +#### fix build bug: + +https://github.com/cloose/CuteMarkEd/issues/321 + ### DESCRIPTION +> 这个版本的 CuteMarked 将所需要的资源打包成本地资源文件,因此不需要联网(适合于没有网络的情况下进行 markdown 编辑)。打包的资源文件有 +> +> * MathJax +> * Reveal + + A Qt-based, free and open source markdown editor with live HTML preview, math expressions, code syntax highlighting and syntax highlighting of markdown document. ![screenshot](http://cloose.github.io/CuteMarkEd/images/screenshot_06.png) diff --git a/app-static/template/htmltemplate.cpp b/app-static/template/htmltemplate.cpp index 83f7c91d..59a5b4c5 100644 --- a/app-static/template/htmltemplate.cpp +++ b/app-static/template/htmltemplate.cpp @@ -102,7 +102,7 @@ QString HtmlTemplate::buildHtmlHeader(RenderOptions options) const header += ""; } - header += "\n"; + header += "\n"; } // add Highlight.js script to HTML header diff --git a/app-static/template/presentationtemplate.cpp b/app-static/template/presentationtemplate.cpp index 106afd47..d6b22516 100644 --- a/app-static/template/presentationtemplate.cpp +++ b/app-static/template/presentationtemplate.cpp @@ -49,12 +49,12 @@ QString PresentationTemplate::buildRevealPlugins(RenderOptions options) const // add MathJax.js script as reveal plugin if (options.testFlag(Template::MathSupport)) { - plugins += "{ src: 'https://cdn.jsdelivr.net/reveal.js/2.6.2/plugin/math/math.js', async: true },\n"; + plugins += "{ src: 'qrc:/reveal/plugin/math/math.js', async: true },\n"; } // add Highlight.js script as reveal plugin if (options.testFlag(Template::CodeHighlighting)) { - plugins += "{ src: 'https://cdn.jsdelivr.net/reveal.js/2.6.2/plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },\n"; + plugins += "{ src: 'qrc:/reveal/plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },\n"; } return plugins; diff --git a/app/app.pro b/app/app.pro index fcc8524a..0e528547 100644 --- a/app/app.pro +++ b/app/app.pro @@ -78,7 +78,7 @@ macx { hunspell/spellchecker_macx.cpp } -unix { +unix:!macx { SOURCES += \ hunspell/spellchecker_unix.cpp } diff --git a/app/main.cpp b/app/main.cpp index 01ea46ce..bb805f63 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -20,11 +20,14 @@ #include #include #include +#include +#include #ifdef Q_OS_WIN #include #include #include +#include // Helper function to register supported file types // This is needed to enable the application jump list to show the desired recent files @@ -57,6 +60,7 @@ int main(int argc, char *argv[]) app.setApplicationName("CuteMarkEd"); app.setApplicationDisplayName("CuteMarkEd"); app.setApplicationVersion("0.11.3"); + QResource::registerResource(QDir::currentPath()+"/math_reveal.rcc"); #ifdef Q_OS_WIN QStringList fileTypes; diff --git a/app/template_presentation.html b/app/template_presentation.html index f8d3b31f..be3daafc 100644 --- a/app/template_presentation.html +++ b/app/template_presentation.html @@ -2,10 +2,10 @@ - - + + - + @@ -22,19 +22,19 @@ - - + +