Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/link.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Link check
on:
pull_request:
merge_group:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Run ESLint check
uses: ./.github/actions/lint
with:
package-name: '@editorjs/link'

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Build the package
uses: ./.github/actions/build
with:
package-name: '@editorjs/link'
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ A model-driven, collaboration-ready Editor.js engine split into focused packages
| [`@editorjs/paragraph`](packages/tools/paragraph) | Built-in Paragraph block tool |
| [`@editorjs/bold`](packages/tools/bold) | Built-in Bold inline tool |
| [`@editorjs/italic`](packages/tools/italic) | Built-in Italic inline tool |
| [`@editorjs/link`](packages/tools/link) | Built-in Link inline tool |
Comment on lines 35 to +38

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably better to add a separate section for tools/plugins

@Reversean Reversean Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, moved all tool entries (including #158 #159 #160) in additional section.

Please, check this out.


## Documentation

Expand Down
3 changes: 1 addition & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,13 @@
"typescript": "^5.5.4"
},
"dependencies": {
"@codexteam/icons": "^0.3.3",
"@editorjs/bold": "workspace:^",
"@editorjs/collaboration-manager": "workspace:^",
"@editorjs/dom": "^1.1.0",
"@editorjs/dom-adapters": "workspace:^",
"@editorjs/editorjs": "^2.30.5",
"@editorjs/helpers": "^1.2.2",
"@editorjs/italic": "workspace:^",
"@editorjs/link": "workspace:^",
"@editorjs/model": "workspace:^",
"@editorjs/paragraph": "workspace:^",
"@editorjs/sdk": "workspace:^",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { generateId } from './utils/uid.js';
import { Paragraph } from '@editorjs/paragraph';
import { BoldInlineTool } from '@editorjs/bold';
import { ItalicInlineTool } from '@editorjs/italic';
import { LinkInlineTool } from './tools/internal';
import { LinkInlineTool } from '@editorjs/link';
import { ShortcutsPlugin } from './plugins/ShortcutsPlugin.js';
import { DOMAdapters } from '@editorjs/dom-adapters';
import { BlocksManager } from './components/BlockManager.js';
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/tools/internal/index.ts

This file was deleted.

3 changes: 3 additions & 0 deletions packages/core/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
},
{
"path": "../tools/italic/tsconfig.build.json"
},
{
"path": "../tools/link/tsconfig.build.json"
}
]
}
3 changes: 3 additions & 0 deletions packages/core/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
},
{
"path": "../tools/italic/tsconfig.build.json"
},
{
"path": "../tools/link/tsconfig.build.json"
}
]
}
24 changes: 24 additions & 0 deletions packages/tools/link/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# Swap the comments on the following lines if you don't wish to use zero-installs
# Documentation here: https://yarnpkg.com/features/zero-installs
#!.yarn/cache
#.pnp.*

# IDE
.idea/*

node_modules/*
dist/*

# tests
coverage/
reports/

# stryker temp files
.stryker-tmp
3 changes: 3 additions & 0 deletions packages/tools/link/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Link

Built-in Editor.js Inline Tool for linking selected text.
32 changes: 32 additions & 0 deletions packages/tools/link/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import CodeX from 'eslint-config-codex';

export default [
...CodeX,
{
languageOptions: {
parserOptions: {
project: './tsconfig.eslint.json',
tsconfigRootDir: import.meta.dirname,
sourceType: 'module',
},
},
rules: {
'n/no-unpublished-import': ['error', {
allowModules: [
'eslint-config-codex',
],
ignoreTypeImport: true,
}],
'n/no-missing-import': 'off',
/**
* @todo remove when sdk's emitted declarations stop leaking the unresolvable `@/` path alias
* (see EditorAPI type reaching this package through InlineToolConstructorOptions)
*/
'@typescript-eslint/no-unsafe-assignment': 'off',
'n/no-unsupported-features/node-builtins': ['error', {
version: '>=24.0.0',
ignores: [],
}],
},
},
];
29 changes: 29 additions & 0 deletions packages/tools/link/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "@editorjs/link",
"version": "0.0.0",
"packageManager": "yarn@4.0.1",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"scripts": {
"build": "yarn clear && tsc --build tsconfig.build.json",
"build:declaration": "yarn build --emitDeclarationOnly",
"lint": "eslint",
"lint:ci": "yarn lint --max-warnings 0",
"lint:fix": "yarn lint --fix",
"clear": "rm -rf dist && rm -f tsconfig.build.tsbuildinfo && rm -f tsconfig.tsbuildinfo"
},
"devDependencies": {
"@types/eslint": "^9.6.1",
"@types/node": "^22.10.2",
"eslint": "^9.24.0",
"eslint-config-codex": "^2.0.3",
"eslint-plugin-import": "^2.31.0",
"typescript": "^5.5.4"
},
"dependencies": {
"@codexteam/icons": "^0.3.3",
"@editorjs/dom": "^1.1.0",
"@editorjs/sdk": "workspace:^"
}
}
13 changes: 13 additions & 0 deletions packages/tools/link/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": "./tsconfig.json",
"exclude": [
"node_modules/**/*",
"dist/**/*",
"**/*.spec.ts"
],
"references": [
{
"path": "../../sdk/tsconfig.build.json"
}
]
}
14 changes: 14 additions & 0 deletions packages/tools/link/tsconfig.eslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"compilerOptions": {
"types": ["node"],
},
"extends": "./tsconfig.json",
"include": [
"src/**/*",
"eslint.config.mjs",
],
"exclude": [
"dist/**/*",
"node_modules/**/*",
]
}
27 changes: 27 additions & 0 deletions packages/tools/link/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"compilerOptions": {
"composite": true,
"target": "esnext",
"module": "esnext",
"moduleResolution": "bundler",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true,
"rootDir": "src",
"outDir": "dist",
"declaration": true,
"declarationMap": true,
"sourceMap": true
},
"include": ["src/**/*"],
"exclude": [
"node_modules/**/*",
"dist/**/*"
],
"references": [
{
"path": "../../sdk/tsconfig.build.json"
}
]
}
19 changes: 17 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2302,14 +2302,13 @@ __metadata:
dependencies:
"@babel/core": "npm:^7.29.0"
"@babel/preset-env": "npm:^7.29.2"
"@codexteam/icons": "npm:^0.3.3"
"@editorjs/bold": "workspace:^"
"@editorjs/collaboration-manager": "workspace:^"
"@editorjs/dom": "npm:^1.1.0"
"@editorjs/dom-adapters": "workspace:^"
"@editorjs/editorjs": "npm:^2.30.5"
"@editorjs/helpers": "npm:^1.2.2"
"@editorjs/italic": "workspace:^"
"@editorjs/link": "workspace:^"
"@editorjs/model": "workspace:^"
"@editorjs/paragraph": "workspace:^"
"@editorjs/sdk": "workspace:^"
Expand Down Expand Up @@ -2447,6 +2446,22 @@ __metadata:
languageName: unknown
linkType: soft

"@editorjs/link@workspace:^, @editorjs/link@workspace:packages/tools/link":
version: 0.0.0-use.local
resolution: "@editorjs/link@workspace:packages/tools/link"
dependencies:
"@codexteam/icons": "npm:^0.3.3"
"@editorjs/dom": "npm:^1.1.0"
"@editorjs/sdk": "workspace:^"
"@types/eslint": "npm:^9.6.1"
"@types/node": "npm:^22.10.2"
eslint: "npm:^9.24.0"
eslint-config-codex: "npm:^2.0.3"
eslint-plugin-import: "npm:^2.31.0"
typescript: "npm:^5.5.4"
languageName: unknown
linkType: soft

"@editorjs/model-types@workspace:^, @editorjs/model-types@workspace:packages/model-types":
version: 0.0.0-use.local
resolution: "@editorjs/model-types@workspace:packages/model-types"
Expand Down