Skip to content

Commit 7e27f07

Browse files
Merge branch 'next' into next
2 parents 9f9e3f4 + d9f301f commit 7e27f07

File tree

149 files changed

+1858
-663
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

149 files changed

+1858
-663
lines changed

.eslintrc

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,23 @@
3636
"navigator": true
3737
},
3838
"rules": {
39-
"jsdoc/require-returns-type": "off"
40-
}
39+
"jsdoc/require-returns-type": "off",
40+
"@typescript-eslint/strict-boolean-expressions": "warn",
41+
"@typescript-eslint/consistent-type-imports": "error",
42+
"@typescript-eslint/consistent-type-exports": "error"
43+
},
44+
"overrides": [
45+
{
46+
"files": [
47+
"tsconfig.json",
48+
"package.json",
49+
"tsconfig.*.json",
50+
"tslint.json"
51+
],
52+
"rules": {
53+
"quotes": [1, "double"],
54+
"semi": [1, "never"],
55+
}
56+
}
57+
]
4158
}

cypress.config.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import { defineConfig } from 'cypress';
2+
import path from 'node:path';
3+
import vitePreprocessor from 'cypress-vite';
24

35
export default defineConfig({
46
env: {
@@ -12,7 +14,9 @@ export default defineConfig({
1214
// We've imported your old cypress plugins here.
1315
// You may want to clean this up later by importing these.
1416
setupNodeEvents(on, config) {
15-
on('file:preprocessor', require('cypress-vite')(config));
17+
on('file:preprocessor', vitePreprocessor({
18+
configFile: path.resolve(__dirname, './vite.config.test.js'),
19+
}));
1620

1721
/**
1822
* Plugin for cypress that adds better terminal output for easier debugging.
@@ -21,7 +25,7 @@ export default defineConfig({
2125
*/
2226
require('cypress-terminal-report/src/installLogsPrinter')(on);
2327

24-
require('./test/cypress/plugins/index.ts')(on, config);
28+
require('@cypress/code-coverage/task')(on, config);
2529
},
2630
specPattern: 'test/cypress/tests/**/*.cy.{js,jsx,ts,tsx}',
2731
supportFile: 'test/cypress/support/index.ts',

docs/CHANGELOG.md

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,43 @@
11
# Changelog
22

3+
### 2.31.0
4+
5+
- `New` - Inline tools (those with `isReadOnlySupported` specified) can now be used in read-only mode
6+
- `Improvement` - Block manager passes target tool config to the `conversionConfig.import` method on conversion
7+
- `Fix` - Fix selection of first block in read-only initialization with "autofocus=true"
8+
- `Fix` - Incorrect caret position after blocks merging in Safari
9+
- `Fix` - Several toolbox items exported by the one tool have the same shortcut displayed in toolbox
10+
- `Improvement` - The current block reference will be updated in read-only mode when blocks are clicked
11+
- `Fix` - codex-notifier and codex-tooltip moved from devDependencies to dependencies in package.json to solve type errors
12+
13+
### 2.30.7
14+
15+
- `Fix` - Link insertion in Safari fixed
16+
17+
### 2.30.6
18+
19+
- `Fix` – Fix the display of ‘Convert To’ near blocks that do not have the ‘conversionConfig.export’ rule specified
20+
- `Fix` – The Plus button does not appear when the editor is loaded in an iframe in Chrome
21+
- `Fix` - Prevent inline toolbar from closing in nested instance of editor
22+
23+
### 2.30.5
24+
25+
`Fix` – Fix exported types
26+
27+
### 2.30.4
28+
29+
- `Fix` - Tool's exporting types added
30+
31+
### 2.30.3
32+
33+
- `Fix` – I18n in nested popover
34+
35+
### 2.30.2
36+
37+
- `Fix` – The onChange callback won't be fired when editor is initialized in the Read-Only mode
38+
- `Fix` – Convert To supports i18n again
39+
- `Fix` – Prevent form submit on inline tool click
40+
341
### 2.30.1
442

543
- `Fix` – Remove fake selection after multiple "convert to" inline tool toggles
@@ -9,7 +47,7 @@
947
- `New` – Block Tunes now supports nesting items
1048
- `New` – Block Tunes now supports separator items
1149
- `New`*Menu Config* – New item type – HTML
12-
`New`*Menu Config* – Default and HTML items now support hints
50+
- `New`*Menu Config* – Default and HTML items now support hints
1351
- `New` – Inline Toolbar has new look 💅
1452
- `New` – Inline Tool's `render()` now supports [Menu Config](https://editorjs.io/menu-config/) format
1553
- `New`*ToolsAPI* – All installed block tools now accessible via ToolsAPI `getBlockTools()` method
@@ -18,11 +56,11 @@
1856
- `New` – "Convert to" control is now also available in Block Tunes
1957
- `New` — Editor.js now supports contenteditable placeholders out of the box. Just add `data-placeholder` or `data-placeholder-active` attribute to make it work. The first one will work like native placeholder while the second one will show placeholder only when block is current.
2058
- `Improvement` — Now Paragraph placeholder will be shown for the current paragraph, not only the first one.
21-
- `Improvment` - The API `blocks.update` now accepts `tunes` data as optional third argument and makes `data` - block data as optional.
59+
- `Improvement` - The API `blocks.update` now accepts `tunes` data as optional third argument and makes `data` - block data as optional.
2260
- `Improvement` — The ability to merge blocks of different types (if both tools provide the conversionConfig)
2361
- `Improvement` - The API `blocks.convert()` now returns the new block API
2462
- `Improvement` - The API `caret.setToBlock()` now can accept either BlockAPI or block index or block id
25-
- `Impovement`*MenuConfig*`TunesMenuConfig` type is deprecated, use the `MenuConfig` instead
63+
- `Improvement`*MenuConfig*`TunesMenuConfig` type is deprecated, use the `MenuConfig` instead
2664
`Improvement`*Types*`BlockToolConstructorOptions` type improved, `block` and `config` are not optional anymore
2765
- `Improvement` - The Plus button and Block Tunes toggler are now better aligned with large line-height blocks, such as Headings
2866
- `Improvement` — Creating links on Android devices: now the mobile keyboard will have an "Enter" key for accepting the inserted link.

example/tools/nested-list

package.json

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@editorjs/editorjs",
3-
"version": "2.30.1",
3+
"version": "2.31.0-rc.5",
44
"description": "Editor.js — open source block-style WYSIWYG editor with JSON output",
55
"main": "dist/editorjs.umd.js",
66
"module": "dist/editorjs.mjs",
@@ -40,20 +40,18 @@
4040
},
4141
"devDependencies": {
4242
"@babel/register": "^7.21.0",
43-
"@codexteam/icons": "^0.3.0",
43+
"@codexteam/icons": "0.3.2",
4444
"@codexteam/shortcuts": "^1.1.1",
4545
"@cypress/code-coverage": "^3.10.3",
4646
"@editorjs/code": "^2.7.0",
4747
"@editorjs/delimiter": "^1.2.0",
48-
"@editorjs/header": "^2.7.0",
48+
"@editorjs/header": "^2.8.8",
4949
"@editorjs/paragraph": "^2.11.6",
5050
"@editorjs/simple-image": "^1.4.1",
5151
"@types/node": "^18.15.11",
5252
"chai-subset": "^1.6.0",
53-
"codex-notifier": "^1.1.2",
54-
"codex-tooltip": "^1.0.5",
5553
"core-js": "3.30.0",
56-
"cypress": "^13.7.1",
54+
"cypress": "^13.13.3",
5755
"cypress-intellij-reporter": "^0.0.7",
5856
"cypress-plugin-tab": "^1.0.5",
5957
"cypress-terminal-report": "^5.3.2",
@@ -77,5 +75,10 @@
7775
"collective": {
7876
"type": "opencollective",
7977
"url": "https://opencollective.com/editorjs"
78+
},
79+
"dependencies": {
80+
"@editorjs/caret": "^1.0.1",
81+
"codex-notifier": "^1.1.2",
82+
"codex-tooltip": "^1.0.5"
8083
}
8184
}

src/codex.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
import { EditorConfig } from '../types';
3+
import type { EditorConfig } from '../types';
44

55
/**
66
* Apply polyfills

src/components/__module.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { EditorModules } from '../types-internal/editor-modules';
2-
import { EditorConfig } from '../../types';
3-
import { ModuleConfig } from '../types-internal/module-config';
1+
import type { EditorModules } from '../types-internal/editor-modules';
2+
import type { EditorConfig } from '../../types';
3+
import type { ModuleConfig } from '../types-internal/module-config';
44
import Listeners from './utils/listeners';
5-
import EventsDispatcher from './utils/events';
6-
import { EditorEventMap } from './events';
5+
import type EventsDispatcher from './utils/events';
6+
import type { EditorEventMap } from './events';
77

88
/**
99
* The type <T> of the Module generic.

src/components/block-tunes/block-tune-delete.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
* @classdesc Editor's default tune that moves up selected block
44
* @copyright <CodeX Team> 2018
55
*/
6-
import { API, BlockTune } from '../../../types';
6+
import type { API, BlockTune } from '../../../types';
77
import { IconCross } from '@codexteam/icons';
8-
import { MenuConfig } from '../../../types/tools/menu-config';
8+
import type { MenuConfig } from '../../../types/tools/menu-config';
99

1010
/**
1111
*

src/components/block-tunes/block-tune-move-down.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
* @copyright <CodeX Team> 2018
55
*/
66

7-
import { API, BlockTune } from '../../../types';
7+
import type { API, BlockTune } from '../../../types';
88
import { IconChevronDown } from '@codexteam/icons';
9-
import { TunesMenuConfig } from '../../../types/tools';
9+
import type { TunesMenuConfig } from '../../../types/tools';
1010

1111

1212
/**

0 commit comments

Comments
 (0)