Skip to content

Commit 764277d

Browse files
Merge pull request #67 from JonasDoebertin/develop
Merge 1.5.0
2 parents 5691525 + d0d19c0 commit 764277d

23 files changed

+646
-463
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/bin export-ignore
22
/.gitattributes export-ignore
33
/.gitignore export-ignore
4+
/.jsbeatifyrc export-ignore
45
/.jshintrc export-ignore
56
/.scrutinizer.yml export-ignore

.jsbeautifyrc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"js": {
3+
"indent_size": 4,
4+
"indent_char": " ",
5+
"indent_level": 0,
6+
"indent_with_tabs": false,
7+
"preserve_newlines": true,
8+
"max_preserve_newlines": 2,
9+
"space_in_paren": false,
10+
"space_after_anon_function": true,
11+
"brace_style": "end-expand",
12+
"space_before_conditional": true,
13+
"end_with_newline": true,
14+
"jslint_happy": true
15+
}
16+
}

AUTHORS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
List of Visual Markdown Editor contributors. Updated before every release.
22

3+
alkin kasap
34
Andreas Nymark
5+
Jonas Dbertin
46
Jonas Döbertin
57
malvese
68
Martin

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
# Changelog
22

3+
## Version 1.5.0
4+
5+
**Features:**
6+
7+
* Smarter header toggling
8+
* Smarter list toggling
9+
10+
**Changes:**
11+
12+
* Drop support for Kirby 2.1 and below
13+
* Drop support for PHP 5.3 and below
14+
* Only enable fixed toolbar if field is focused
15+
* Updated to CodeMirror 5.8
16+
17+
**Bugfixes**
18+
19+
* More compatible way of getting the current panel language
20+
321
## Version 1.4.0
422

523
**Features:**

PLUGIN_INFO.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ If you like what I'm doing for the community and you want to support further dev
1212

1313
*Cheers, Jonas*
1414

15+
## Requirements
16+
17+
* **Kirby 2.2 or above**
18+
* **PHP 5.4 or above**
19+
1520
## Installation
1621

1722
### Copy & Pasting

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ If you like what I'm doing for the community and you want to support further dev
1919

2020
*Cheers, Jonas*
2121

22+
## Requirements
23+
24+
* **Kirby 2.2 or above**
25+
* **PHP 5.4 or above**
26+
2227
## Installation
2328

2429
### Copy & Pasting

assets/css/codemirror-5.5.0.css renamed to assets/css/codemirror-5.8.0.css

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,21 @@
4141

4242
/* CURSOR */
4343

44-
.CodeMirror div.CodeMirror-cursor {
44+
.CodeMirror-cursor {
4545
border-left: 1px solid black;
46+
border-right: none;
47+
width: 0;
4648
}
4749
/* Shown when moving in bi-directional text */
4850
.CodeMirror div.CodeMirror-secondarycursor {
4951
border-left: 1px solid silver;
5052
}
51-
.CodeMirror.cm-fat-cursor div.CodeMirror-cursor {
53+
.cm-fat-cursor .CodeMirror-cursor {
5254
width: auto;
5355
border: 0;
5456
background: #7e7;
5557
}
56-
.CodeMirror.cm-fat-cursor div.CodeMirror-cursors {
58+
.cm-fat-cursor div.CodeMirror-cursors {
5759
z-index: 1;
5860
}
5961

@@ -82,7 +84,7 @@
8284
}
8385

8486
/* Can style cursor different in overwrite (non-insert) mode */
85-
div.CodeMirror-overwrite div.CodeMirror-cursor {}
87+
.CodeMirror-overwrite .CodeMirror-cursor {}
8688

8789
.cm-tab { display: inline-block; text-decoration: inherit; }
8890

@@ -284,19 +286,19 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
284286
overflow: hidden;
285287
visibility: hidden;
286288
}
287-
.CodeMirror-measure pre { position: static; }
288289

289-
.CodeMirror div.CodeMirror-cursor {
290-
position: absolute;
291-
border-right: none;
292-
width: 0;
293-
}
290+
.CodeMirror-cursor { position: absolute; }
291+
.CodeMirror-measure pre { position: static; }
294292

295293
div.CodeMirror-cursors {
296294
visibility: hidden;
297295
position: relative;
298296
z-index: 3;
299297
}
298+
div.CodeMirror-dragcursors {
299+
visibility: visible;
300+
}
301+
300302
.CodeMirror-focused div.CodeMirror-cursors {
301303
visibility: visible;
302304
}

assets/css/visualmarkdown.css

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* Visual Markdown Editor Field for Kirby 2
33
*
4-
* @version 1.3.4
4+
* @version 1.5.0
55
* @author Jonas Döbertin <hello@jd-powered.net>
66
* @copyright Jonas Döbertin <hello@jd-powered.net>
77
* @link https://github.com/JonasDoebertin/kirby-visual-markdown
@@ -177,12 +177,11 @@
177177
margin: 0;
178178
padding: 0;
179179
position: relative;
180-
z-index: 100;
181180
}
182181

183182
.markdownfield-wrapper .visualmarkdown-toolbar-fixed {
184183
position: fixed;
185-
top: 0;
184+
top: 48px;
186185
z-index: 999;
187186
}
188187

@@ -242,6 +241,7 @@
242241
width: 12em;
243242
background: #ffffff;
244243
box-shadow: 0 2px 5px rgba(0,0,0,.3), 0 0 15px rgba(0,0,0,.2);
244+
z-index: 100;
245245
}
246246

247247
.markdownfield-wrapper .visualmarkdown-toolbar li:hover ul {
@@ -409,6 +409,7 @@
409409
top: 0;
410410
left: 0;
411411
right: 0;
412+
z-index: 100;
412413
}
413414

414415
.markdownfield-wrapper-fullscreen .CodeMirror {

assets/js/codemirror-compressed-5.5.0.min.js

Lines changed: 0 additions & 21 deletions
This file was deleted.

assets/js/codemirror-compressed-5.8.0.min.js

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/kirbytags-mode.js

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* Visual Markdown Editor Field for Kirby 2
33
*
4-
* @version 1.3.4
4+
* @version 1.5.0
55
* @author Jonas Döbertin <hello@jd-powered.net>
66
* @copyright Jonas Döbertin <hello@jd-powered.net>
77
* @link https://github.com/JonasDoebertin/kirby-visual-markdown
@@ -13,7 +13,7 @@
1313
*
1414
* @since 1.3.0
1515
*/
16-
CodeMirror.defineMode('kirbytext', function(config, modeConfig) {
16+
CodeMirror.defineMode('kirbytext', function (config, modeConfig) {
1717
'use strict';
1818

1919
var states = {
@@ -23,13 +23,12 @@ CodeMirror.defineMode('kirbytext', function(config, modeConfig) {
2323
{
2424
regex: /[^\]]\((?=[a-z0-9]+:)/i,
2525
token: 'kirbytext-open',
26-
next: 'attribute'
27-
},
28-
{
26+
next: 'attribute'
27+
}, {
2928
regex: /\((?=[a-z0-9]+:)/i,
30-
sol: true,
29+
sol: true,
3130
token: 'kirbytext-open',
32-
next: 'attribute'
31+
next: 'attribute'
3332
}
3433
],
3534

@@ -38,13 +37,13 @@ CodeMirror.defineMode('kirbytext', function(config, modeConfig) {
3837
{
3938
regex: /[a-z0-9]+: ?(?!\/\/)/i,
4039
token: 'kirbytext-attribute',
41-
next: 'value'
40+
next: 'value'
4241
},
4342
// Match a Kirbytext tags closing bracket
4443
{
4544
regex: /\)/,
4645
token: 'kirbytext-close',
47-
next: 'start'
46+
next: 'start'
4847
}
4948
],
5049

@@ -53,12 +52,11 @@ CodeMirror.defineMode('kirbytext', function(config, modeConfig) {
5352
{
5453
regex: /[^\)]+? (?=(?:[a-z0-9]+:))/i,
5554
token: 'kirbytext-value',
56-
next: 'attribute'
57-
},
58-
{
55+
next: 'attribute'
56+
}, {
5957
regex: /[^\)]+?(?=\))/i,
6058
token: 'kirbytext-value',
61-
next: 'attribute'
59+
next: 'attribute'
6260
},
6361
],
6462
meta: {}

0 commit comments

Comments
 (0)