@contentful/field-editor-markdown 2.3.2 → 2.3.3-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -100,7 +100,14 @@ function create(host, options) {
|
|
|
100
100
|
}
|
|
101
101
|
cm.setOption('extraKeys', {
|
|
102
102
|
Tab: function() {
|
|
103
|
-
|
|
103
|
+
const line = cm.getLine(cm.getCursor().line);
|
|
104
|
+
const leadingSpaces = (line.match(/^ */) ?? [
|
|
105
|
+
''
|
|
106
|
+
])[0].length;
|
|
107
|
+
const indentUnit = cm.getOption('indentUnit') ?? 2;
|
|
108
|
+
if (leadingSpaces + indentUnit <= 3) {
|
|
109
|
+
replaceSelectedText(getIndentation());
|
|
110
|
+
}
|
|
104
111
|
},
|
|
105
112
|
Enter: 'newlineAndIndentContinueMarkdownList',
|
|
106
113
|
Esc: ()=>{
|
|
@@ -44,7 +44,14 @@ export function create(host, options) {
|
|
|
44
44
|
}
|
|
45
45
|
cm.setOption('extraKeys', {
|
|
46
46
|
Tab: function() {
|
|
47
|
-
|
|
47
|
+
const line = cm.getLine(cm.getCursor().line);
|
|
48
|
+
const leadingSpaces = (line.match(/^ */) ?? [
|
|
49
|
+
''
|
|
50
|
+
])[0].length;
|
|
51
|
+
const indentUnit = cm.getOption('indentUnit') ?? 2;
|
|
52
|
+
if (leadingSpaces + indentUnit <= 3) {
|
|
53
|
+
replaceSelectedText(getIndentation());
|
|
54
|
+
}
|
|
48
55
|
},
|
|
49
56
|
Enter: 'newlineAndIndentContinueMarkdownList',
|
|
50
57
|
Esc: ()=>{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/field-editor-markdown",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.3-canary.0+cad01e3e",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"publishConfig": {
|
|
66
66
|
"registry": "https://npm.pkg.github.com/"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "cad01e3e96e743d140d9d5a949056f6a7a5a69db"
|
|
69
69
|
}
|