Skip to content

Commit 5c341fe

Browse files
Update readme; Update packing
1 parent ad4d8f9 commit 5c341fe

File tree

5 files changed

+29
-27
lines changed

5 files changed

+29
-27
lines changed

.github/workflows/npm-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v2
16-
- uses: actions/setup-node@v1
16+
- uses: actions/setup-node@v2
1717
with:
18-
node-version: 12
18+
node-version: 14
1919
registry-url: https://registry.npmjs.org/
2020
- run: npm ci
2121
- run: npm publish

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
node_modules
2-
/dist
32
/*.tgz
3+
/index.js

.npmignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
*
2-
!/dist/**
2+
!/index.js

README.md

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,38 +7,40 @@ More info at https://editorjs.io/
77

88
## Installation
99

10-
Create an `editorjs` folder into the `extensions/interfaces` folder of your Directus project and then copy the `dist/extensions/interfaces/editorjs/index.js` of this repository into it.
10+
### Directus as npm package
11+
12+
If using Directus as npm package, you can include the extension as package in your `package.json` file as:
13+
14+
```json
15+
"dependencies": {
16+
"directus-extension-editorjs": "latest"
17+
}
18+
```
19+
20+
### Docker installation / extensions directory
21+
22+
If you want to use in docker container or into the extension directory, you need to add it
23+
manualy from the package tar
24+
25+
```bash
26+
cd <your directus extensions directory>/interfaces
27+
curl -LO directus-extension-editorjs-interface.tgz
28+
tar xvf directus-extension-editorjs*.tgz
29+
mv package editorjs
30+
```
31+
32+
### Build by yourself
1133

1234
You can also clone this repository and build it by yourself.
1335

1436
## Usage
1537

1638
To use this custom interface into a data model, you have to:
39+
1740
- Add a simple field with **JSON** type
1841
- In the **Interface** section on the left choose **Editor.js**
1942
- Enjoy ! 🎉
2043

21-
## Options
22-
23-
| Option | Description | Default |
24-
| ------------- | ------------------------------------ | ----------- |
25-
| `placeholder` | Set text to appear in the canvas | `''` |
26-
| `tools` | What tools to include in the editor | _See below_ |
27-
| `font` | Default font family to use in editor | sans-serif |
28-
| `bordered` | Displays border around the editor | `false` |
29-
30-
### Default tools
31-
32-
- header
33-
- list
34-
- code
35-
- image
36-
- paragraph
37-
- delimeter
38-
- checklist
39-
- quote
40-
- underline
41-
4244
### Output
4345

4446
```javascript

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
],
1616
"directus:extension": {
1717
"type": "interface",
18-
"path": "dist/index.js",
18+
"path": "index.js",
1919
"source": "src/index.js",
2020
"host": "v9.0.0-rc.85",
2121
"hidden": false

0 commit comments

Comments
 (0)