Skip to content

Commit 154254b

Browse files
committed
Merge branch 'master' into Move-npm-publish-to-common-workflow
2 parents 9351cd9 + 863834c commit 154254b

File tree

16 files changed

+1458
-1686
lines changed

16 files changed

+1458
-1686
lines changed

.babelrc

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

.eslintignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*.html
2+
dist/
3+
node_modules/
4+

.github/workflows/npm-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ jobs:
1010
uses: codex-team/github-workflows/.github/workflows/npm-publish-and-notify-reusable.yml@main
1111
secrets:
1212
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
13-
CODEX_BOT_NOTIFY_EDITORJS_PUBLIC_CHAT: ${{ secrets.CODEX_BOT_NOTIFY_EDITORJS_PUBLIC_CHAT }}
13+
CODEX_BOT_NOTIFY_EDITORJS_PUBLIC_CHAT: ${{ secrets.CODEX_BOT_NOTIFY_EDITORJS_PUBLIC_CHAT }}

.github/workflows/test.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,16 @@ jobs:
1010
- uses: actions/checkout@v2
1111
- uses: actions/setup-node@v1
1212
with:
13-
node-version: 16
13+
node-version: 24
1414
registry-url: https://registry.npmjs.org/
1515

1616
- name: Cache node modules
17-
uses: actions/cache@v1
17+
uses: actions/cache@v4
1818
with:
1919
path: node_modules
2020
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
2121
restore-keys: |
22-
${{ runner.OS }}-build-${{ env.cache-name }}-
23-
${{ runner.OS }}-build-
24-
${{ runner.OS }}-
22+
${{ runner.os }}-node-
2523
2624
- run: yarn install
2725
- run: yarn build

.nvmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
24
2+

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Tool uses Editor.js pasted patterns handling and inserts iframe with embedded co
1212
- [Facebook](https://www.facebook.com) - `facebook` service
1313
- [Instagram](https://www.instagram.com/codex_team/) - `instagram` service
1414
- [YouTube](https://youtube.com) - `youtube` service
15-
- [Twitter](https://twitter.com/codex_team) - `twitter` service. (https://twitframe.com used for render)
15+
- [X](https://twitter.com) - `twitter` service. (official twitter api is used for render, no need to use twitframe)
1616
- [Twitch](https://twitch.tv) - `twitch-video` service for videos and `twitch-channel` for channels
1717
- [Miro](https://miro.com) - `miro` service
1818
- [Vimeo](https://vimeo.com)`vimeo` service
@@ -25,10 +25,11 @@ Tool uses Editor.js pasted patterns handling and inserts iframe with embedded co
2525
- [CodePen](https://codepen.io)`codepen` service
2626
- [Pinterest](https://www.pinterest.com) - `pinterest` service
2727
- [GitHub Gist](https://gist.github.com) - `github` service
28+
- [Reddit](https://www.reddit.com/) - `reddit` service
29+
- [Figma](https://www.figma.com/) - `figma` service
30+
- [Whimsical](https://whimsical.com/) - whimsical service
2831
- 👇 Any other [customized service](#add-more-services)
2932

30-
31-
3233
## Installation
3334

3435
Get the package
@@ -151,6 +152,7 @@ var editor = EditorJS({
151152
```
152153

153154
#### Inline Toolbar
155+
154156
Editor.js provides useful inline toolbar. You can allow it\`s usage in the Embed Tool caption by providing `inlineToolbar: true`.
155157

156158
```javascript
@@ -180,7 +182,6 @@ var editor = EditorJS({
180182
| height | `number` | embedded content height
181183
| caption | `string` | content caption
182184

183-
184185
```json
185186
{
186187
"type" : "embed",

index.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>Embed Tool | EditorJS</title>
7+
</head>
8+
<body>
9+
<div id="editorjs"></div>
10+
<script src="https://cdn.jsdelivr.net/npm/@editorjs/editorjs@latest"></script>
11+
<script type="module">
12+
import Embed from "./src/index.ts";
13+
14+
const editor = new EditorJS({
15+
holder: 'editorjs',
16+
tools: {
17+
embed: {
18+
class: Embed,
19+
},
20+
},
21+
});
22+
</script>
23+
</body>
24+
</html>

package.json

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@editorjs/embed",
3-
"version": "2.7.0",
3+
"version": "2.8.0",
44
"keywords": [
55
"codex editor",
66
"embed",
@@ -10,11 +10,13 @@
1010
"description": "Embed Tool for Editor.js",
1111
"license": "MIT",
1212
"repository": "https://github.com/editor-js/embed",
13+
"packageManager": "[email protected]",
1314
"files": [
1415
"dist"
1516
],
1617
"main": "./dist/embed.umd.js",
1718
"module": "./dist/embed.mjs",
19+
"types": "dist/index.d.ts",
1820
"exports": {
1921
".": {
2022
"import": "./dist/embed.mjs",
@@ -24,7 +26,7 @@
2426
"scripts": {
2527
"dev": "vite",
2628
"build": "vite build",
27-
"test": "mocha -r @babel/register -r ignore-styles --recursive ./test",
29+
"test": "mocha --require ts-node/register --require ignore-styles --recursive './test/**/*.ts'",
2830
"lint": "eslint src/ --ext .js",
2931
"lint:errors": "eslint src/ --ext .js --quiet",
3032
"lint:fix": "eslint src/ --ext .js --fix"
@@ -33,10 +35,14 @@
3335
"name": "CodeX",
3436
"email": "[email protected]"
3537
},
38+
"engines": {
39+
"node": ">=24.0.0"
40+
},
3641
"devDependencies": {
37-
"@babel/plugin-transform-runtime": "^7.23.2",
38-
"@babel/preset-env": "^7.23.2",
39-
"@babel/register": "^7.22.15",
42+
"@types/chai": "^4.3.16",
43+
"@types/debounce": "^1.2.4",
44+
"@types/mocha": "^10.0.6",
45+
"@types/node": "^24.0.0",
4046
"chai": "^4.2.0",
4147
"debounce": "^1.2.0",
4248
"eslint": "^7.25.0",
@@ -45,8 +51,13 @@
4551
"mocha": "^7.1.1",
4652
"postcss-nested": "^4.2.1",
4753
"postcss-nested-ancestors": "^2.0.0",
54+
"ts-node": "^10.9.2",
55+
"typescript": "^5.4.5",
4856
"vite": "^4.5.0",
49-
"vite-plugin-css-injected-by-js": "^3.3.0"
57+
"vite-plugin-css-injected-by-js": "^3.3.0",
58+
"vite-plugin-dts": "^3.9.1"
5059
},
51-
"dependencies": {}
60+
"dependencies": {
61+
"@editorjs/editorjs": "^2.31.0"
62+
}
5263
}

0 commit comments

Comments
 (0)