summaryrefslogtreecommitdiff
path: root/public/js
diff options
context:
space:
mode:
authorClaudius Coenen2019-05-12 23:30:28 +0200
committerGitHub2019-05-12 23:30:28 +0200
commitdabcb91185488703dca6bce30cfea5c968694fd9 (patch)
tree1299b3756eb14fa1969bfede0c49830e74ebd60f /public/js
parent5bb69297678c38d0793238edf4d04cad5ec7d4d4 (diff)
parente4c24c293673ca3cbbe08939c81e0a53404771f8 (diff)
Merge pull request #44 from pferreir/fix-23
Fix toolbar day mode and upload button
Diffstat (limited to '')
-rw-r--r--public/js/lib/editor/index.js4
-rw-r--r--public/js/lib/editor/toolbar.html34
2 files changed, 20 insertions, 18 deletions
diff --git a/public/js/lib/editor/index.js b/public/js/lib/editor/index.js
index 17d30ca4..8553caa9 100644
--- a/public/js/lib/editor/index.js
+++ b/public/js/lib/editor/index.js
@@ -3,6 +3,8 @@ import config from './config'
import statusBarTemplate from './statusbar.html'
import toolBarTemplate from './toolbar.html'
+import '../../../css/ui/toolbar.css'
+
/* config section */
const isMac = CodeMirror.keyMap.default === CodeMirror.keyMap.macDefault
const defaultEditorMode = 'gfm'
@@ -219,8 +221,8 @@ export default class Editor {
makeComment.click(() => {
utils.insertText(this.editor, '> []')
})
+
uploadImage.bind('change', function (e) {
- console.log("tiggered")
var files = e.target.files || e.dataTransfer.files
e.dataTransfer = {}
e.dataTransfer.files = files
diff --git a/public/js/lib/editor/toolbar.html b/public/js/lib/editor/toolbar.html
index 9ea1aacc..dc5b8ad4 100644
--- a/public/js/lib/editor/toolbar.html
+++ b/public/js/lib/editor/toolbar.html
@@ -1,49 +1,49 @@
<div class="toolbar">
<div class="btn-toolbar" role="toolbar" aria-label="Editor toolbar">
<div class="btn-group" role="group">
- <a id="makeBold" class="btn btn-sm btn-dark text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" title="Bold">
+ <a id="makeBold" class="btn btn-sm text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" title="Bold">
<i class="fa fa-bold fa-fw"></i>
</a>
- <a id="makeItalic" class="btn btn-sm btn-dark text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" title="Italic">
+ <a id="makeItalic" class="btn btn-sm text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" title="Italic">
<i class="fa fa-italic fa-fw"></i>
</a>
- <a id="makeStrike" class="btn btn-sm btn-dark text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" title="Strikethrough">
+ <a id="makeStrike" class="btn btn-sm text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" title="Strikethrough">
<i class="fa fa-strikethrough fa-fw"></i>
</a>
- <a id="makeHeader" class="btn btn-sm btn-dark text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" title="Heading">
+ <a id="makeHeader" class="btn btn-sm text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" title="Heading">
<i class="fa fa-h1 fa-fw">H</i>
</a>
- <a id="makeCode" class="btn btn-sm btn-dark text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" title="Code">
+ <a id="makeCode" class="btn btn-sm text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" title="Code">
<i class="fa fa-code fa-fw"></i>
</a>
- <a id="makeQuote" class="btn btn-sm btn-dark text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" title="Quote">
+ <a id="makeQuote" class="btn btn-sm text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" title="Quote">
<i class="fa fa-quote-right fa-fw"></i>
</a>
- <a id="makeGenericList" class="btn btn-sm btn-dark text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" title="List">
+ <a id="makeGenericList" class="btn btn-sm text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" title="List">
<i class="fa fa-list fa-fw"></i>
</a>
- <a id="makeOrderedList" class="btn btn-sm btn-dark text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" title="Numbered List">
+ <a id="makeOrderedList" class="btn btn-sm text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" title="Numbered List">
<i class="fa fa-list-ol fa-fw"></i>
</a>
- <a id="makeCheckList" class="btn btn-sm btn-dark text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" title="Check List">
+ <a id="makeCheckList" class="btn btn-sm text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" title="Check List">
<i class="fa fa-check-square fa-fw"></i>
</a>
- <a id="makeLink" class="btn btn-sm btn-dark text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" title="Link">
+ <a id="makeLink" class="btn btn-sm text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" title="Link">
<i class="fa fa-link fa-fw"></i>
</a>
- <a id="makeImage" class="btn btn-sm btn-dark text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" title="Image">
+ <a id="makeImage" class="btn btn-sm text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" title="Image">
<i class="fa fa-image fa-fw"></i>
</a>
- <span id="uploadImage" class="btn btn-sm btn-dark btn-file ui-upload-image" title="Upload Image">
- <i class="fa fa-upload fa-fw"></i><input type="file" accept="image/*" name="upload" multiple>
- </span>
- <a id="makeTable" class="btn btn-sm btn-dark text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" title="Table">
+ <a id="uploadImage" class="btn btn-sm btn-file ui-upload-image" title="Upload Image">
+ <i class="fa fa-upload fa-fw"></i><input type="file" accept="image/*" name="upload" multiple title="Upload Image">
+ </a>
+ <a id="makeTable" class="btn btn-sm text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" title="Table">
<i class="fa fa-table fa-fw"></i>
</a>
- <a id="makeLine" class="btn btn-sm btn-dark text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" title="Line">
+ <a id="makeLine" class="btn btn-sm text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" title="Line">
<i class="fa fa-minus fa-fw"></i>
</a>
- <a id="makeComment" class="btn btn-sm btn-dark text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" title="Comment">
+ <a id="makeComment" class="btn btn-sm text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" title="Comment">
<i class="fa fa-comment fa-fw"></i>
</a>
</div>