diff --git a/app/index.js b/app/index.js index 145dd827..bf082004 100644 --- a/app/index.js +++ b/app/index.js @@ -20,6 +20,11 @@ app.use(express.compress()); // Serve static resources app.use(express.static(__dirname + '/../public')); +// Serve editor.html in /viewer +app.get('/editor', function (req, res) { + res.render('editor.html'); +}); + // Serve viewer.html in /viewer app.get('/viewer', function (req, res) { res.render('viewer.html'); diff --git a/public/editor.html b/public/editor.html index 4fa16bbb..5024b8df 100644 --- a/public/editor.html +++ b/public/editor.html @@ -11,8 +11,7 @@ - + + + + + + +
+ + +
+
+ +

Unrivalled writing experience.

+ +
+
+ +
+
+

Rich markdown editor

+ +

StackEdit’s syntax highlighting is unique. The refined text formatting of the editor helps you visualize the final rendering of your documents.

+ +

WYSIWYG controls

+ +

StackEdit provides very handy formatting buttons and shortcuts, thanks to PageDown, the WYSIWYG-style markdown editor used by Stack Overflow.

+ +

Live preview with ScrollSync

+ +

StackEdit’s ScrollSync extension binds together the scrollbars of the preview panel and the editor panel to ensure that you can always keep an eye on the output while writing.

+ +

Built-in spell-checker

+ +

StackEdit uses browser’s built-in spell-checker to perform efficient, multi-language spell-checking and correction suggestions.

+ +

Fully customizable

+ +

StackEdit has an infinite combinations of settings. Themes, layout, shortcuts, extensions… almost everything can be personalized. For the rest, StackEdit lets you create your own extension…

+
+
+ + +

Designed for web writing

+ +

Simultaneous collaboration

+ +

Documents in StackEdit can be synchronized and shared through Google Drive and Dropbox. When two collaborators are working on the same document at the same time, StackEdit takes care of merging the modifications.

+ +

Review comments

+ +

StackEdit allows you to insert inline comments and embed collaborator discussions in your documents, much like Microsoft Word or Google Docs.

+ +

Publish straight to your blog

+ +

StackEdit can upload your documents directly to Blogger, GitHub, Tumblr, WordPress… You can choose whether to upload in markdown format, HTML, or to format the output using Underscore template engine.

+ +

Write offline

+ +

Even when you travel, StackEdit is still accessible and lets you write in documents offline just like any desktop application. Now, you have no excuse!

+ +

Extended markdown support

+ +

GitHub Flavored Markdown

+ +

StackEdit supports different markdown flavors such as Markdown Extra and GitHub flavored Markdown. Each markdown feature can be enabled or disabled at your convenience.

+ +

LaTeX mathematical expressions

+ +

StackEdit integrates MathJax to render mathematics from LaTeX expressions inside your markdown document, as you would do on Stack Exchange.

+ +

UML diagrams

+ +

StackEdit enables you to write sequence diagrams and flow charts using a simple text syntax.

+ +
+
+
+ + + diff --git a/public/res/core.js b/public/res/core.js index e5bc84cc..ca9751e3 100644 --- a/public/res/core.js +++ b/public/res/core.js @@ -11,13 +11,13 @@ define([ "settings", "eventMgr", "monetizejs", - "text!html/bodyIndex.html", + "text!html/bodyEditor.html", "text!html/bodyViewer.html", "text!html/tooltipSettingsTemplate.html", "text!html/tooltipSettingsPdfOptions.html", "storage", 'pagedown' -], function($, _, crel, editor, layout, constants, utils, storage, settings, eventMgr, MonetizeJS, bodyIndexHTML, bodyViewerHTML, settingsTemplateTooltipHTML, settingsPdfOptionsTooltipHTML) { +], function($, _, crel, editor, layout, constants, utils, storage, settings, eventMgr, MonetizeJS, bodyEditorHTML, bodyViewerHTML, settingsTemplateTooltipHTML, settingsPdfOptionsTooltipHTML) { var core = {}; @@ -291,7 +291,7 @@ define([ document.body.innerHTML = bodyViewerHTML; } else { - document.body.innerHTML = bodyIndexHTML; + document.body.innerHTML = bodyEditorHTML; } // Initialize utils library diff --git a/public/res/fileMgr.js b/public/res/fileMgr.js index 6126c3f1..293b75e5 100644 --- a/public/res/fileMgr.js +++ b/public/res/fileMgr.js @@ -189,7 +189,7 @@ define([ } }); $(".action-open-stackedit").click(function() { - window.location.href = "."; + window.location.href = "editor"; }); $(".action-edit-document").click(function() { var content = $editorElt.val(); diff --git a/public/res/img/syntax-highlighting.gif b/public/res/img/syntax-highlighting.gif new file mode 100644 index 00000000..33a96070 Binary files /dev/null and b/public/res/img/syntax-highlighting.gif differ diff --git a/public/res/styles/base.less b/public/res/styles/base.less index db817a79..4f63f880 100644 --- a/public/res/styles/base.less +++ b/public/res/styles/base.less @@ -253,12 +253,9 @@ code { } pre, pre.prettyprint { - border: 0 solid @pre-border-color; - border-left: 10px solid @pre-border-color; - border-radius: 0; - border-top-right-radius: 5px; - border-bottom-right-radius: 5px; - padding: 10px 15px; + border: 0; + padding: 10px 20px; + border-radius: 5px; code { background-color: transparent !important; } diff --git a/public/viewer.html b/public/viewer.html index 9f3e6193..899b53da 100644 --- a/public/viewer.html +++ b/public/viewer.html @@ -9,8 +9,7 @@ - +