Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 2.16 #966

Merged
merged 45 commits into from
Nov 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
c221a64
2.16.0
Jul 8, 2019
fdeae3f
[Refactor] Separate internal and external settings (#845)
gohabereg Jul 10, 2019
af581d3
Enable flipping tools via standalone class (#830)
khaydarov Jul 15, 2019
0d1c86c
fixed a link in readme.md (#856)
Jul 30, 2019
52669d7
Fix Block selection via CMD+A (#829)
khaydarov Jul 31, 2019
d22667d
Improve style of selected blocks (#858)
neSpecc Jul 31, 2019
e2ca2a6
Fix case when property 'observer' in modificationObserver is not defi…
VLZH Sep 7, 2019
1623839
Bump lodash.template from 4.4.0 to 4.5.0 (#885)
dependabot[bot] Sep 8, 2019
3ab0435
Bump eslint-utils from 1.3.1 to 1.4.2 (#886)
dependabot[bot] Sep 8, 2019
749894b
Bump mixin-deep from 1.3.1 to 1.3.2 (#887)
dependabot[bot] Sep 8, 2019
bbcc13a
update bundle and readme
neSpecc Sep 8, 2019
fc9e13a
Update README.md
neSpecc Sep 8, 2019
3bfaa20
upd codeowners, fix funding
neSpecc Sep 8, 2019
72ee05a
Merge branch 'master' into release/2.16
neSpecc Oct 3, 2019
56839f7
Minor Docs Fix according to main Readme (#916)
ChaituVR Oct 20, 2019
a438185
Inline Toolbar now contains Conversion Toolbar (#932)
neSpecc Nov 20, 2019
a9c4649
Block lifecycle hooks (#906)
gohabereg Nov 21, 2019
d086b6d
[Fix] Arrow selection (#964)
gohabereg Nov 30, 2019
ea3c767
[issue-926]: fix dom iterator leafing when items are empty (#958)
khaydarov Nov 30, 2019
461f9a5
Issue 869 (#963)
gohabereg Nov 30, 2019
3e2bf87
Fix issue 943 (#965)
gohabereg Nov 30, 2019
36f69f0
[Draft] Feature/tooltip enhancements (#907)
khaydarov Nov 30, 2019
b19cb06
[issue-779]: Grammarly conflicts (#956)
khaydarov Nov 30, 2019
2e9faf1
Submodule Header now on master
neSpecc Nov 30, 2019
0689c82
Submodule Marker now on master
neSpecc Nov 30, 2019
533512e
Submodule Paragraph now on master
neSpecc Nov 30, 2019
7547e11
Submodule InlineCode now on master
neSpecc Nov 30, 2019
0d54c94
Submodule Simple Image now on master
neSpecc Nov 30, 2019
fa4b282
[issue-868]: Deleting multiple blocks triggers back button in Firefox…
khaydarov Nov 30, 2019
729f2ea
pass options on removeEventListener (#904)
MarinaZadoyanchuk Nov 30, 2019
1e20882
[Fix] Selection rangecount (#968)
gohabereg Nov 30, 2019
bee449b
Fix #952 (#969)
neSpecc Nov 30, 2019
fdcedb2
Update codex.tooltips
neSpecc Nov 30, 2019
053e25e
Merge branch 'release/2.16' of https://github.com/codex-team/editor.j…
neSpecc Nov 30, 2019
2729f8f
Selection bugfix (#970)
khaydarov Nov 30, 2019
c6f5be6
remove inline toolbar closing on cross block selection mouse up due t…
khaydarov Nov 30, 2019
cff5434
[Feature] Log levels (#971)
gohabereg Nov 30, 2019
ba2fe25
Decrease margins (#973)
neSpecc Nov 30, 2019
9661916
Update src/components/domIterator.ts
neSpecc Nov 30, 2019
6682034
[Fix] Fix delete blocks api method (#974)
gohabereg Nov 30, 2019
f3f94e3
Update docs/usage.md
neSpecc Nov 30, 2019
5910fa8
rm unused
neSpecc Nov 30, 2019
630cb76
Update yarn.lock file
Nov 30, 2019
f50abf4
Merge branch 'release/2.16' of github.com:codex-team/editor.js into r…
Nov 30, 2019
755f429
upd bundle, changelog
neSpecc Nov 30, 2019
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
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,6 @@
[submodule "example/tools/warning"]
path = example/tools/warning
url = https://github.com/editor-js/warning
[submodule "src/components/external/codex.tooltips"]
path = src/components/external/codex.tooltips
url = https://github.com/codex-team/codex.tooltips
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@

END OF TERMS AND CONDITIONS

Copyright © 2015-2018 CodeX
Copyright © 2015-present CodeX

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
26 changes: 18 additions & 8 deletions dist/editor.js

Large diffs are not rendered by default.

36 changes: 34 additions & 2 deletions dist/editor.licenses.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
MIT
MIT License

Copyright (c) 2014-2018 Sebastian McKenzie and other contributors
Copyright (c) 2014-present Sebastian McKenzie and other contributors

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand All @@ -28,7 +28,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
MIT
MIT License

Copyright (c) 2014-2018 Sebastian McKenzie <[email protected]>
Copyright (c) 2014-present Sebastian McKenzie and other contributors

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down Expand Up @@ -150,6 +150,17 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


codex-tooltip
MIT
Copyright 2019 CodeX https://codex.so

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


core-js
MIT
Copyright (c) 2014-2018 Denis Pushkarev
Expand Down Expand Up @@ -379,3 +390,24 @@ Apache License

regenerator-runtime
MIT
MIT License

Copyright (c) 2014-present, Facebook, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
18 changes: 12 additions & 6 deletions dist/sprite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Changelog

### 2.16

- `Improvements` — Inline Toolbar design improved
- `Improvements` — Conversion Toolbar now included in the Inline Toolbar [#853](https://github.com/codex-team/editor.js/issues/853)
- `Improvements` — All buttons now have beautiful Tooltips provided by [CodeX Tooltips](https://github.com/codex-team/codex.tooltips)
- `New` — new Tooltips API for displaying tooltips near your custom elements
— `New` *API* — Block [lifecycle hooks](tools.md#block-lifecycle-hooks)
— `New` *Inline Tools API* — Ability to specify Tool's title via `title` static getter.
- `Fix` — On selection from end to start backspace is working as expected now [#869](https://github.com/codex-team/editor.js/issues/869)
— `Fix` — Fix flipper with empty dom iterator [#926](https://github.com/codex-team/editor.js/issues/926)
- `Fix` — Normalize node before walking through children at `isEmpty` method [943](https://github.com/codex-team/editor.js/issues/943)
— `Fix` — Fixed Grammarly conflict [#779](https://github.com/codex-team/editor.js/issues/779)
— `Improvements` — Module Listeners now correctly removes events with options [#904](https://github.com/codex-team/editor.js/pull/904)
— `Improvements` — Styles API: `.cdx-block` default vertical margins decreased from 0.7 to 0.4 ems.
— `Fix` — Fixed History Back on block deletion by Backspace in Firefox [#967](https://github.com/codex-team/editor.js/pull/967)
- `Fix` — Fixed `getRangeCount` call if range count is 0 [#938](https://github.com/codex-team/editor.js/issues/938)
- `New` — Log levels now available to suppress Editor.js console messages [#962](https://github.com/codex-team/editor.js/issues/962)
- `Fix` — Fixed wrong navigation on block deletion

### 2.15.1

- `Refactoring` — Constants of tools settings separated by internal and external to correspond API
Expand Down
51 changes: 50 additions & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,55 @@ It makes following steps:

After executing the `destroy` method, editor inctance becomes an empty object. This way you will free occupied JS Heap on your page.

### Shorthands
### Tooltip API

Methods for showing Tooltip helper near your elements. Parameters are the same as in [CodeX Tooltips](http://github.com/codex-team/codex.tooltips) lib.

![](https://capella.pics/00e7094a-fdb9-429b-8015-9c56f19b4ef5.jpg)

#### Show

Method shows tooltip with custom content on passed element

```js
this.api.tooltip.show(element, content, options);
```

| parameter | type | description |
| -- | -- | -- |
| `element` | _HTMLElement_ | Tooltip will be showed near this element |
| `content` | _String_ or _Node_ | Content that will be appended to the Tooltip |
| `options` | _Object_ | Some displaying options, see below |

Available showing options

| name | type | action |
| -- | -- | -- |
| placement | `top`, `bottom`, `left`, `right` | Where to place the tooltip. Default value is `bottom' |
| marginTop | _Number_ | Offset above the tooltip with `top` placement |
| marginBottom | _Number_ | Offset below the tooltip with `bottom` placement |
| marginLeft | _Number_ | Offset at left from the tooltip with `left` placement |
| marginRight | _Number_ | Offset at right from the tooltip with `right` placement |
| delay | _Number_ | Delay before showing, in ms. Default is `70` |
| hidingDelay | _Number_ | Delay before hiding, in ms. Default is `0` |

#### Hide

Method hides the Tooltip.

```js
this.api.tooltip.hide();
```

#### onHover

Decorator for showing tooltip near some element by "mouseenter" and hide by "mouseleave".

```js
this.api.tooltip.onHover(element, content, options);
```

### API Shorthands

Editor`s API provides some shorthands for API methods.

Expand All @@ -179,3 +227,4 @@ const editor = EditorJS();
editor.focus();
editor.save();
```

2 changes: 1 addition & 1 deletion docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Then require this script.

### Save sources to project

Copy [editorjs.js](../dist/editor.js) file to your project and load it.
Copy [editor.js](../dist/editor.js) file to your project and load it.

```html
<script src="editor.js"></script>
Expand Down
25 changes: 25 additions & 0 deletions docs/tools-inline.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,28 @@ static get sanitize() {
```

Read more about Sanitizer configuration at the [Tools#sanitize](tools.md#sanitize)

### Specifying a title

You can pass your Tool's title via `title` static getter. It can be used, for example, in the Tooltip with
icon description that appears by hover.

![](https://capella.pics/00e7094a-fdb9-429b-8015-9c56f19b4ef5.jpg)

```ts
export default class BoldInlineTool implements InlineTool {
/**
* Specifies Tool as Inline Toolbar Tool
*
* @return {boolean}
*/
public static isInline = true;

/**
* Title for hover-tooltip
*/
public static title: string = 'Bold';

// ... other methods
}
```
14 changes: 14 additions & 0 deletions docs/tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -462,3 +462,17 @@ class ListTool {
}
}
```

## Block Lifecycle hooks

### `rendered()`

Called after Block contents is added to the page

### `updated()`

Called each time Block contents is updated

### `removed()`

Called after Block contents is removed from the page but before Block instance deleted
24 changes: 23 additions & 1 deletion docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,26 @@ var editor = new EditorJS({

```

If you are using your custom `Initial Block`, `placeholder` property is passed in `config` to your Tool constructor.
If you are using your custom `Initial Block`, `placeholder` property is passed in `config` to your Tool constructor.

## Log level

You can specify log level for Editor.js console messages via `logLevel` property of configuration:

```js
var editor = new EditorJS({
//...
logLevel: 'WARN'
//..
})
```

Possible values:

| Value | Description |
| ----- | ---------------------------- |
| `VERBOSE` | Show all messages |
| `INFO` | Show info and debug messages |
| `WARN` | Show errors and warns only |
| `ERROR` | Show errors only |

2 changes: 1 addition & 1 deletion example/example-dev.html
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@
{
type: 'image',
data: {
url: 'https://codex.so/upload/redactor_images/o_e48549d1855c7fc1807308dd14990126.jpg',
url: 'https://capella.pics/bbe6896c-ca1f-439e-8cb6-ebfda0d397d6.jpg',
caption: '',
stretched: false,
withBorder: true,
Expand Down
2 changes: 1 addition & 1 deletion example/example.html
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@
{
type: 'image',
data: {
url: 'https://codex.so/upload/redactor_images/o_e48549d1855c7fc1807308dd14990126.jpg',
url: 'https://capella.pics/bbe6896c-ca1f-439e-8cb6-ebfda0d397d6.jpg',
caption: '',
stretched: false,
withBorder: true,
Expand Down
2 changes: 1 addition & 1 deletion example/tools/header
2 changes: 1 addition & 1 deletion example/tools/inline-code
2 changes: 1 addition & 1 deletion example/tools/marker
2 changes: 1 addition & 1 deletion example/tools/simple-image
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@editorjs/editorjs",
"version": "2.15.1",
"version": "2.16.0",
"description": "Editor.js — Native JS, based on API and Open Source",
"main": "dist/editor.js",
"types": "./types/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/assets/bold.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/assets/italic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading