Skip to content
Open
Show file tree
Hide file tree
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
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion app-static/template/htmltemplate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ QString HtmlTemplate::buildHtmlHeader(RenderOptions options) const
header += "<script type=\"text/x-mathjax-config\">MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\\\(','\\\\)']]}});</script>";
}

header += "<script type=\"text/javascript\" src=\"http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML\"></script>\n";
header += "<script type=\"text/javascript\" src=\"qrc:/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML\"></script>\n";
}

// add Highlight.js script to HTML header
Expand Down
4 changes: 2 additions & 2 deletions app-static/template/presentationtemplate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion app/app.pro
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ macx {
hunspell/spellchecker_macx.cpp
}

unix {
unix:!macx {
Copy link
Contributor

@Kolcha Kolcha Aug 17, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I done the same in #302, e353102, but it still not merged
this is enough to fix #321

SOURCES += \
hunspell/spellchecker_unix.cpp
}
Expand Down
4 changes: 4 additions & 0 deletions app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@
#include <QCommandLineParser>
#include <QLibraryInfo>
#include <QTranslator>
#include <QDir>
#include <QResource>

#ifdef Q_OS_WIN
#include <QDir>
#include <QFileInfo>
#include <QSettings>
#include <QResource>

// Helper function to register supported file types
// This is needed to enable the application jump list to show the desired recent files
Expand Down Expand Up @@ -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");
Copy link
Contributor

@Kolcha Kolcha Aug 18, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. looks dangerous, especially on Linux. program will try to find "math_reveal.rcc" in $PWD, this is unacceptable in most cases.
    file would be found only if program will be run from folder where it located.
    this will not work for Windows too (when double clicking on file), except case when program is started by double clicking .exe and then File->Open called
  2. .rcc is compiled Qt resources file, but there are no any .qrc and source files from which it was compiled. this is bad idea (in my opinion) to add "unknown" compiled binary, when it can be compiled each time with other sources


#ifdef Q_OS_WIN
QStringList fileTypes;
Expand Down
16 changes: 8 additions & 8 deletions app/template_presentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/reveal.js/2.6.2/css/reveal.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/reveal.js/2.6.2/css/theme/default.css" id="theme">
<link rel="stylesheet" href="qrc:/reveal/css/reveal.min.css">
<link rel="stylesheet" href="qrc:/reveal/css/theme/default.css" id="theme">
<!-- For syntax highlighting -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/reveal.js/2.6.2/lib/css/zenburn.css">
<link rel="stylesheet" href="qrc:/reveal/lib/css/zenburn.css">
<!--__HTML_HEADER__-->
</head>
<body>
Expand All @@ -22,19 +22,19 @@
</div>
</div>

<script src="https://cdn.jsdelivr.net/reveal.js/2.6.2/lib/js/head.min.js"></script>
<script src="https://cdn.jsdelivr.net/reveal.js/2.6.2/js/reveal.min.js"></script>
<script src="qrc:/reveal/lib/js/head.min.js"></script>
<script src="qrc:/reveal/js/reveal.min.js"></script>

<script>
Reveal.initialize({
math: {
mathjax: 'https://cdn.mathjax.org/mathjax/latest/MathJax.js',
mathjax: 'qrc:/MathJax/MathJax.js',
config: 'TeX-AMS_HTML-full' // See http://docs.mathjax.org/en/latest/config-files.html
},

dependencies: [
{ src: 'https://cdn.jsdelivr.net/reveal.js/2.6.2/plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'https://cdn.jsdelivr.net/reveal.js/2.6.2/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'qrc:/reveal/plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'qrc:/reveal/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
<!--__REVEAL_PLUGINS__-->
]
});
Expand Down
Loading