@editorjs/editorjs
Advanced tools
Comparing version 2.12.4 to 2.13.0
{ | ||
"name": "@editorjs/editorjs", | ||
"version": "2.12.4", | ||
"version": "2.13.0", | ||
"description": "Editor.js — Native JS, based on API and Open Source", | ||
@@ -43,3 +43,2 @@ "main": "dist/editor.js", | ||
"babel-plugin-class-display-name": "^2.1.0", | ||
"codex-notifier": "^1.1.1", | ||
"css-loader": "^2.1.1", | ||
@@ -73,3 +72,6 @@ "cssnano": "^4.1.10", | ||
"url": "https://opencollective.com/editorjs" | ||
}, | ||
"dependencies": { | ||
"codex-notifier": "^1.1.2" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
<p align="center"><img src="https://capella.pics/79ce946a-d636-41cd-aa96-d3bc5ecfde03.jpg"></p> | ||
<a href="https://editorjs.io/"><p align="center"><img src="https://capella.pics/79ce946a-d636-41cd-aa96-d3bc5ecfde03.jpg"></p></a> | ||
@@ -6,2 +6,4 @@ [![](https://flat.badgen.net/npm/v/@editorjs/editorjs?icon=npm)](https://www.npmjs.com/package/@editorjs/editorjs) | ||
[![](https://flat.badgen.net/bundlephobia/minzip/@editorjs/editorjs?color=green)](https://www.npmjs.com/package/@editorjs/editorjs) | ||
[![Backers on Open Collective](https://opencollective.com/editorjs/backers/badge.svg)](#backers) | ||
[![Sponsors on Open Collective](https://opencollective.com/editorjs/sponsors/badge.svg)](#sponsors) | ||
[![](https://flat.badgen.net/npm/license/@editorjs/editorjs)](https://www.npmjs.com/package/@editorjs/editorjs) | ||
@@ -22,53 +24,25 @@ [![Join the chat at https://gitter.im/codex-team/editor.js](https://badges.gitter.im/codex-team/editor.js.svg)](https://gitter.im/codex-team/editor.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
### 2.7-2.9 changelog | ||
## ⭐️ If you like a project | ||
- `Fix` - Clear focus when click is outside the Editor instance | ||
- `Fix` — Fix CMD+A Selection on multiple Editor instances | ||
- `New` — Toolbox now have beautiful helpers with Tool names and shortcuts | ||
- `Improvements` — Prevent navigating back on Firefox when Block is removing by backspace | ||
- `New` — Blocks selected with Rectangle Selection can be also removed, copied or cut | ||
- `New` — Migrate from `postcss-cssnext` to `postcss-preset-env` and disable `postcss-custom-properties` which conflicts with `postcss-preset-env` | ||
- `New` *RectangeSelection* — Ability to select Block or several Blocks with mouse | ||
If you like Editor.js you can support project improvements and development of new features with a small donation on [Open Collective](https://opencollective.com/editorjs) or [Patreon](https://www.patreon.com/editorjs) | ||
### 2.2—2.7 changelog | ||
## Documentation | ||
- `New` *Sanitize API* — [Sanitize Config](https://github.com/codex-team/editor.js/blob/master/docs/tools.md#automatic-sanitize) of `Block Tools` now automatically extends by tags of `Inline Tools` that is enabled by current Tool by `inlineToolbar` option. You don't need more to specify `a, b, mark, code` manually. This feature will be added to fields that supports inline markup. | ||
- `New` *Block Selection* — Ability to select Block by `CMD+A`, and the whole Editor by double `CMD+A`. After that, you can copy (`CMD+C`), remove (`Backspace`) or clear (`Enter`) selected Blocks. | ||
- `New` *[Styles API](https://github.com/codex-team/editor.js/blob/master/types/api/styles.d.ts)* — Added `button` class for stylization of any buttons provided by Tools with one unified style. | ||
- `New` *[Notifier API](https://github.com/codex-team/editor.js/blob/master/docs/api.md#notifierapi)* — methods for showing user notifications: on success, errors, warnings, etc. | ||
- `New` *Block Tool* — [Table](http://github.com/editor-js/table) constructor 💪 | ||
- `New` If one of the Tools is unavailable on Editor initialization, its Blocks will be rendered with *Dummy Block*, describing that user can not edit content of this Block. Dummy Blocks can be moved, removed and saved as normal Blocks. So saved data won't be lost if one of the Tools is failed | ||
- `New` [Public TS-types](https://github.com/codex-team/editor.js/tree/master/types) are presented. | ||
- `Changes` *Tools API* — options `irreplaceable` and `contentless` was removed. | ||
- `Changes` *Tools API* — [Paste API](https://github.com/codex-team/editor.js/blob/master/docs/tools.md#paste-handling): tags, patterns and mime-types now should be specified by Tool's `pasteConfig` static property. Custom Paste Event should be handled by `onPaste(event)` that should not be static from now. | ||
- `Changes` *Tools API* — options `displayInToolbox ` and `toolboxIcon` was removed. Use [`toolbox`](https://github.com/codex-team/editor.js/blob/master/docs/tools.md#internal-tool-settings) instead, that should return object with `icon` and `title` field, or `false` if Tool should not be placed at the Toolbox. Also, there are a way to override `toolbox {icon, title}` settings provided by Tool with you own settings at the Initial Config. | ||
- `Improvements` — All Projects code now on TypeScript | ||
- `Improvements` — NPM package size decreased from 1300kb to 422kb | ||
- `Improvements` — Bundle size decreased from 438kb to 252kb | ||
- `Improvements` — `Inline Toolbar`: when you add a Link to the selected fragment, Editor will highlight this fragment even when Caret is placed into the URL-input. | ||
- `Improvements` — Block Settings won't be shown near empty Blocks of `initialType` by default. You should click on them instead. | ||
- `Improvements` — `onChange`-callback now will be fired even with children attributes changing. | ||
- `Improvements` — HTMLJanitor package was updated due to found vulnerability | ||
- `Improvements` — Logging improved: now all Editor's logs will be preceded by beautiful label with current Editor version. | ||
- `Improvements` — Internal `isEmpty` checking was improved for Blocks with many children nodes (200 and more) | ||
- `Improvements` — Paste improvements: tags that can be substituted by Tool now will matched even on deep-level of pasted DOM three. | ||
- `Improvements` — There is no more «unavailable» sound on copying Block by `CMD+C` on macOS | ||
- `Improvements` — Dozens of bugfixes and small improvements | ||
Please, visit [https://editorjs.io/](https://editorjs.io) to view all documentation articles. | ||
See a whole [Changelog](/docs/CHANGELOG.md) | ||
- [Base concepts](https://editorjs.io/base-concepts) | ||
- [Getting started](https://editorjs.io/getting-started) | ||
- [Configuration](https://editorjs.io/configuration) | ||
- [How to create a Block Tool Plugin](https://editorjs.io/creating-a-block-tool) | ||
- [How to create an Inline Tool Plugin](https://editorjs.io/creating-an-inline-tool) | ||
- [API for Tools](https://editorjs.io/tools-api) | ||
## Documentation | ||
You can join a [Gitter-channel](https://gitter.im/codex-team/editor.js) or [Telegram-chat](//t.me/codex_editor) and ask a question. | ||
While we develop the new Documentation Site with all stuff, you can check some available docs at the [docs/](docs/) dir. | ||
--- | ||
- [Installation](docs/installation.md) | ||
- [How to use](docs/usage.md) | ||
- [How to create a Block Tool Plugin](docs/tools.md) | ||
- [How to create an Inline Tool Plugin](docs/tools-inline.md) | ||
- [API for Tools](docs/api.md) | ||
## Changelog | ||
Sorry if we missed something. You can join a [Telegram-chat](//t.me/codex_editor) and ask a question. | ||
See a whole [Changelog](/docs/CHANGELOG.md) | ||
--- | ||
# So how to use Editor.js | ||
@@ -80,5 +54,5 @@ | ||
For example, `Paragraph`, `Heading`, `Image`, `Video`, `List` are Blocks. Each Block is represented by Plugin. | ||
We have [many](http://github.com/editor-js/) ready-to-use Plugins and a [simple API](docs/tools.md) for creating new ones. | ||
We have [many](http://github.com/editor-js/) ready-to-use Plugins and a [simple API](https://editorjs.io/tools-api) for creating new ones. | ||
So how to use the Editor after [Installation](docs/installation.md). | ||
So how to use the Editor after [Installation](https://editorjs.io/getting-started). | ||
@@ -158,3 +132,3 @@ - Create new Blocks by Enter or with the Plus Button | ||
```shell | ||
npm i @editorjs/editorjs --save-dev | ||
npm i @editorjs/editorjs | ||
``` | ||
@@ -252,6 +226,6 @@ | ||
Call `editor.saver.save()` and handle returned Promise with saved data. | ||
Call `editor.save()` and handle returned Promise with saved data. | ||
```javascript | ||
editor.saver.save() | ||
editor.save() | ||
.then((savedData) => { | ||
@@ -270,2 +244,26 @@ console.log(savedData); | ||
# Support project improvements | ||
Love Editor.js? Please consider supporting our collective: | ||
👉 [https://opencollective.com/editorjs](https://opencollective.com/editorjs) | ||
👉 [Patreon](https://www.patreon.com/editorjs) | ||
## Contributors | ||
This project exists thanks to all the people who contribute. <img src="https://opencollective.com/editorjs/contributors.svg?width=890&button=false" /> | ||
## Backers | ||
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/editorjs#backer)] | ||
<a href="https://opencollective.com/editorjs#backers" target="_blank"><img src="https://opencollective.com/editorjs/backers.svg?width=890"></a> | ||
## Sponsors | ||
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/editorjs#sponsor)] | ||
<a href="https://opencollective.com/editorjs/sponsor/0/website" target="_blank"><img src="https://opencollective.com/editorjs/sponsor/0/avatar.svg"></a> | ||
# About team | ||
@@ -280,6 +278,1 @@ | ||
[codex.so](https://codex.so) | ||
# Support project improvements | ||
Love Editor.js? Please consider supporting our collective: | ||
👉 [https://opencollective.com/editorjs](https://opencollective.com/editorjs) |
@@ -11,1 +11,2 @@ export * from './blocks'; | ||
export * from './notifier'; | ||
export * from './inline-toolbar' |
@@ -8,6 +8,12 @@ import {ToolConstructable, ToolSettings} from '../tools'; | ||
* Element where Editor will be append | ||
* @deprecated property will be removed in next major release, use holder instead | ||
*/ | ||
holderId?: string; | ||
holderId?: string | HTMLElement; | ||
/** | ||
* Element where Editor will be append | ||
*/ | ||
holder?: string | HTMLElement; | ||
/** | ||
* If true, set caret at the first Block after Editor is ready | ||
@@ -51,2 +57,7 @@ */ | ||
/** | ||
* Height of Editor's bottom area that allows to set focus on the last Block | ||
*/ | ||
minHeight?: number; | ||
/** | ||
* Fires when Editor is ready to work | ||
@@ -53,0 +64,0 @@ */ |
@@ -8,3 +8,3 @@ /** | ||
import {EditorConfig} from './configs'; | ||
import {Blocks, Caret, Events, Listeners, Notifier, Sanitizer, Saver, Selection, Styles, Toolbar} from './api'; | ||
import {Blocks, Caret, Events, Listeners, Notifier, Sanitizer, Saver, Selection, Styles, Toolbar, InlineToolbar} from './api'; | ||
@@ -55,2 +55,3 @@ /** | ||
toolbar: Toolbar; | ||
inlineToolbar: InlineToolbar; | ||
} | ||
@@ -75,3 +76,3 @@ | ||
public toolbar: Toolbar; | ||
public inlineToolbar: InlineToolbar; | ||
constructor(configuration?: EditorConfig|string); | ||
@@ -78,0 +79,0 @@ |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
336257
36
36
1687
1
272
+ Addedcodex-notifier@^1.1.2
+ Addedcodex-notifier@1.1.2(transitive)