Skip to content

Commit f5284d2

Browse files
committed
Add example extension for indent with tab #138
1 parent cfb6bda commit f5284d2

File tree

11 files changed

+4241
-5
lines changed

11 files changed

+4241
-5
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Enhanced, extensible Markdown field for Kirby CMS. Now available in version 2!
5656

5757
## 1. Installation
5858

59-
This version of the plugin requires PHP 7.4.0 and Kirby 3.6.0 or higher. The recommended way of installing is by using Composer:
59+
This version of the plugin requires PHP 8.0 and Kirby 3.6.0 or higher. The recommended way of installing is by using Composer:
6060

6161
```
6262
$ composer require k-community/markdown-field
@@ -251,6 +251,7 @@ The API has changed from version 1, old plugins are not compatible any more and
251251
There are two types of extensions, which allow you to extend the editor to adjust it better to your specific needs:
252252

253253
- **Custom buttons:** You can define your own buttons, which can be added to the editor toolbar. Buttons can define keyboard shortcuts, displays dropdowns and even show a popup.
254+
- **Custom extensions:** You can define your own editor extensions. An example can be found in the `extension-examples/indent-with-tab` folder.
254255
- **Custom highlights:** You can define regex-based custom highlights, which allow you to highlight any text, such as markup for custom syntax (e.g. global text snippets or Wiki-style links)
255256

256257
## 5. Development

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "k-community/markdown-field",
33
"description": "Enhanced markdown editor for Kirby 3",
44
"type": "kirby-plugin",
5-
"version": "2.0.0-rc1",
5+
"version": "2.0.0-rc2",
66
"license": "MIT",
77
"authors": [
88
{
@@ -15,7 +15,7 @@
1515
}
1616
],
1717
"require": {
18-
"php": ">=7.4.0",
18+
"php": ">=8.0.0",
1919
"getkirby/cms": ">=3.6.0",
2020
"getkirby/composer-installer": "^1.2"
2121
},
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[*.php]
12+
indent_size = 4

extension-examples/indent-with-tab/index.js

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php
2+
3+
Kirby::plugin('my/indent-with-tabs', []);

0 commit comments

Comments
 (0)