summaryrefslogtreecommitdiffstats
path: root/web_src
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-11-10 19:16:30 +0000
committerGitHub <noreply@github.com>2020-11-10 14:16:30 -0500
commit13b8c0b7aeac365f0f161467f65c3b9b4e46896a (patch)
treed5a748ae96c42f49a71cc4b9d648097fa88d2459 /web_src
parent21d496364a5e654ba535d06269f6c6679b5c2d74 (diff)
downloadgitea-13b8c0b7aeac365f0f161467f65c3b9b4e46896a.tar.gz
gitea-13b8c0b7aeac365f0f161467f65c3b9b4e46896a.zip
Switch from SimpleMDE to EasyMDE (#13333)
* Switch from SimpleMDE to EasyMDE Signed-off-by: Andrew Thornton <art27@cantab.net> * use webpack to webpack the easymde css Signed-off-by: Andrew Thornton <art27@cantab.net> * move css to only css Signed-off-by: Andrew Thornton <art27@cantab.net> * move loading codemirror modes and addons back in to footer.tmpl Signed-off-by: Andrew Thornton <art27@cantab.net> * Fix arc-green Signed-off-by: Andrew Thornton <art27@cantab.net> * as per @silverwind * reinstall codemirror Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'web_src')
-rw-r--r--web_src/js/easymde.js8
-rw-r--r--web_src/less/_editor.less2
-rw-r--r--web_src/less/themes/theme-arc-green.less6
3 files changed, 12 insertions, 4 deletions
diff --git a/web_src/js/easymde.js b/web_src/js/easymde.js
new file mode 100644
index 0000000000..39ead02c13
--- /dev/null
+++ b/web_src/js/easymde.js
@@ -0,0 +1,8 @@
+import EasyMDE from 'easymde';
+
+import CodeMirror from 'codemirror/lib/codemirror.js';
+
+window.EasyMDE = EasyMDE;
+window.SimpleMDE = EasyMDE;
+window.CodeMirror = CodeMirror;
+
diff --git a/web_src/less/_editor.less b/web_src/less/_editor.less
index e783267167..4ed211a628 100644
--- a/web_src/less/_editor.less
+++ b/web_src/less/_editor.less
@@ -29,7 +29,7 @@
opacity: 1 !important;
}
-.editor-toolbar a:not(:hover) {
+.editor-toolbar button:not(:hover) {
background-color: transparent !important;
}
diff --git a/web_src/less/themes/theme-arc-green.less b/web_src/less/themes/theme-arc-green.less
index 7f989e1721..e7933e0cc0 100644
--- a/web_src/less/themes/theme-arc-green.less
+++ b/web_src/less/themes/theme-arc-green.less
@@ -1784,12 +1784,12 @@ a.ui.labels .label:hover {
border-right-color: var(--color-secondary) !important;
}
-.editor-toolbar a {
+.editor-toolbar button {
color: #87ab63 !important;
}
-.editor-toolbar a.active,
-.editor-toolbar a:hover {
+.editor-toolbar button.active,
+.editor-toolbar button:hover {
background: #2a2e3a;
border-color: transparent;
}