Commit graph

778 commits

Author SHA1 Message Date
Peter Savchenko f9e280fcad
chore(dev): update tools submodules to the last version (#2025)
* update tools version

* add text-variant-tune
2022-04-22 18:24:33 +03:00
Umang G. Patel 18feb06a88
Fix OnChange Event Invocation (#2007)
* fix: call onchange event after block insert

* changelog updated

* patch version updated

* removed the modification observer from saver

* only changelog version added

* delimiter added

* feat: test case added for save inside the onchange
2022-04-07 14:33:09 +05:30
Tanya Fomina 32dcd3fa6d
feat(dx): add a dev-server for debugging on mobile devices from a local network (#2009)
* Add server

* Get rid of express

* Cleanup

* Revert lock

* Revert lock 2

* Update script to substitute ip address automatically

* terminal output improved

* npm ignore devserver.js

* rm spaces

* handle offline state

* Update devserver.js

* Update changelog

Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
2022-04-05 19:49:16 +03:00
Mikhail Popov 771437ed04
Bump codex-tooltip version (#1999) 2022-03-15 17:04:44 +03:00
Umang G. Patel 82e8ff9f40
example link changed (#1993) 2022-03-13 19:06:51 +03:00
Peter Savchenko 640b1a2d7e
fix(readonly): crash with readonly property (#1969)
* fix(readonly): fix readonly property

Resolves #1968

* changelog added

* Update CHANGELOG.md
2022-02-09 20:46:26 +03:00
Peter Savchenko c1bca10d12
fix(ci): incorrect release tag fixed (#1964) 2022-02-08 13:26:13 +03:00
Peter Savchenko 27aa9164a1
chore(readme): roadmap added (#1954)
* chore(readme): roadmap added

* Update README.md

* Update README.md
2022-02-02 18:02:46 +03:00
github-actions[bot] 1188b40959
Bump version (#1862)
Co-authored-by: github-actions <action@github.com>
2022-01-25 17:01:42 +03:00
dependabot[bot] 817beff551
Bump nanoid from 3.1.22 to 3.1.31 (#1944)
Bumps [nanoid](https://github.com/ai/nanoid) from 3.1.22 to 3.1.31.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.1.22...3.1.31)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-25 13:12:19 +03:00
George Berezhnoy e3db19df84
Fire onChange event for native inputs (#1832)
* Fire onChange event for native inputs

* Add changelog
2022-01-13 16:12:08 +00:00
Ilya Moroz 95141f0a2d
commit new submodules versions (#1858) 2022-01-13 18:15:40 +03:00
Ilya Moroz 40c05173a9
[Fix] isFunction function for async functions (#1857)
* fix test of async function, fix TS type because Function is banned type

* add tests for isFunction function

* fix eslint

* add changelog for 2.23.1

* fix changelog

* fix changelog
2022-01-13 00:46:07 +03:00
Peter Savchenko ff91466b14
feat(toolbar): toolbar refactored and ui improved (#1815)
* chore(block-tune-toggler): toggler moved to the left (draft)

* toolbox ui updated

* fixd caret jumpling, improved some styles

* toolbar moving by block-hover

- UI module triggers 'block-hovered' event
- Toolbar uses 'block-hovered' for appearing
- `currentBlock` setter added to the BlockManager
- (reactangle-selection): the throttling added to the mousemove and scroll handlers
- `getBlockIndex` method added to the Api
- (api-blocks): toolbar moving logic removed from `blocks.move()` and `blocks.swap()` methods. Instead, MoveUp and MoveDown tunes uses Toolbar API

* the dark-theme to the example-dev.html

* positioning improved

* fix(rectangle-selection): first click after RS does not clears selection state

* toolbox position fixed

* the toolbox module became a standalone class

- Toolbox became a standalone class from the editor module. It can be accessed only via the owner (the Toolbar module)
- (api.blocks) the insert() method now has the `replace` param. Also, it returns inserted Block API now.

* new(api.listeners): `on()` now returns the listener id. The new `offById()` method added

* fix bug with Tab pressing on hovered but not focused block

* mobile version improved

* upd example dev

* small updaets

* add nested-list

* linting

* (api.toolbar): `toggleBlockSettings` now fires toggling event with the same state

* EventDispatcher used instead of callbacks for the Toolbox

* UIApi added

* fix ci

* git submodules removed from the ci flow

* add paragraph submodule to the ci flow

* Update CHANGELOG.md

* Update package.json

* use ubuntu-latest for chrome ci
2021-11-24 21:14:24 +03:00
github-actions[bot] acdd1f5b4e
Bump version up to 2.23.0-rc.0 (#1785)
* Bump version

* Update package.json

Co-authored-by: github-actions <action@github.com>
Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
2021-10-06 11:35:44 +03:00
Peter Savchenko 9c0fc48d89
feat(block-api): the new dispatchChange() method (#1794)
The new `dispatchChange()` method allows to manually trigger the 'onChange' callback. Useful when Tool made a state mutation that is invisible for editor core.
2021-10-05 23:41:03 +03:00
Peter Savchenko 4f15bbc0cb
feat(onchange): callback now accepts custom event (#1791)
* feat(onchange): callback now accepts custom event

* Delete block-added.ts

* testd updated, changelog added

* Update example-dev.html

* indexes added to all events

* block-removed dispatching on block replacing

* Update example-dev.html
2021-10-05 20:40:44 +03:00
George Berezhnoy 1433c1a7dc
Add build tsconfig for automatic deployments (#1784) 2021-09-17 15:47:29 +03:00
github-actions[bot] 70a736bffa
Bump version up to 2.22.3-rc.0 (#1743)
* Bump version

* Update package.json

Co-authored-by: github-actions <action@github.com>
Co-authored-by: George Berezhnoy <gohabereg@users.noreply.github.com>
2021-09-16 14:42:11 +00:00
George Berezhnoy a3df3b8ace
Fix: pass user configuration to Tool prepare method (#1781)
* Fix: pass user configuration to Tool prepare method

* Fix lint

* update types

* Update changelog
2021-09-16 14:21:38 +00:00
Peter Savchenko 65b86c9203
chore(readme): updated readme and cypress workflow (#1745) 2021-08-07 14:17:31 +03:00
Peter Savchenko 03fb54b474
chore(submodules): pull master to the tools (#1742)
* chore(submodules): pull master to the tools

* add tools:update command

* make command for tools updating

* rm nested list submodule

* fix cypress workflow

* fix package json command

* fix ci
2021-08-07 13:51:05 +03:00
github-actions[bot] 145ece4149
Bump version up to 2.22.2 (#1698)
* Bump version

* Update version

* Bump version

Co-authored-by: github-actions <action@github.com>
Co-authored-by: Georgy Berezhnoy <gohabereg@gmail.com>
2021-07-21 22:14:12 +03:00
George Berezhnoy d2d18f8061
Fix jump on CBS (#1732)
* Fix jump on CBS

* Fix lint
2021-07-21 22:12:13 +03:00
Peter Savchenko 9190824b1d
fix(blocks): plugin's destroy() method will be called on blocks removing (#1719)
* Plugin's destroy() method on blocks removing

* Add changelog

Co-authored-by: Georgy Berezhnoy <gohabereg@gmail.com>
Co-authored-by: George Berezhnoy <gohabereg@users.noreply.github.com>
2021-07-21 21:50:16 +03:00
George Berezhnoy 6f36707f67
Tunes improvements for inline actions (#1722)
* Add tunes improvements

* Allow to show Inline Toolbar at Block Tune Wrapper element

* Add fake cursor on block selection

* Fix lint

* Update types

* Fix bugs with selection

* Remove selection observer

* Update due to comments

* Fix tests

* Update docs/block-tunes.md

Co-authored-by: Peter Savchenko <specc.dev@gmail.com>

* Move fake cursor to selection utils

* Fix missing range for Safari

* Fix data attribute value

* Add comment

* Update z-index for inline-toolbar

* Add changelog

* Remove fake cursor visibility for the core

Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
2021-07-21 21:33:09 +03:00
Taly cf494a7a28
Fix i18n for tunes and tools (#1711)
* we need to call isTune param to get result

* remove Tune from exported name

* Update CHANGELOG.md

* Bump version

* Update Tools.spec.ts

* Update Tools.spec.ts

* prevent tooltip jumping

* Update CHANGELOG.md

* Delete table

* Create table

Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
2021-06-28 13:06:35 +03:00
Peter Savchenko 9e25400bf8
chore(readme): update logos of our sponsors 2021-05-31 08:05:29 +03:00
Taly ce1d394f44
Use "npm dist-tag add" instead of "yarn tag add" (#1693)
* Use "npm dist-tag add" instead of "yarn tag add"

`yarn tag add` somehow throws an error for existing versions, but `npm dist-tag add` works correctly.

resolve #1692

* Remove space
2021-05-27 17:12:23 +03:00
github-actions[bot] 041470d171
Bump version up to 2.22.0 (#1690)
* Bump version

* Update package.json

Co-authored-by: github-actions <action@github.com>
Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
2021-05-26 21:29:56 +03:00
Peter Savchenko a4ffb1a7fc
feature(api): blocks update method added (#1687) 2021-05-26 20:39:25 +03:00
George Berezhnoy 4e7b33c2b8
onChange improvements (#1678)
* onChange improvements

* Return modifications observer module

* Fix lint

* Fix tests
2021-05-26 18:59:32 +03:00
Junghyun Park 51d94e1a11
Add Slid logo as a sponsor in README.md (#1677)
As a Sir Supporter of Editor.js, our Slid team like to be added in Editor.js' README.md. :)
2021-05-09 16:00:44 +03:00
Taly 92b023d566
yarn tag add (#1673)
Add LATEST tag for the published package if this is not a prerelease version
2021-04-28 13:26:42 +03:00
Taly 9d8998e9e7
Fix workflow code (#1672)
`The workflow is not valid. .github/workflows/publish-package-to-npm.yml: Unexpected tag '!github.event.release.prerelease'`
2021-04-28 12:43:16 +03:00
github-actions[bot] 231d122949
Bump version up to 2.21.0 (#1670)
* Bump version

* Update CHANGELOG.md

* Update package.json

Co-authored-by: github-actions <action@github.com>
Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
2021-04-27 22:04:26 +03:00
Jean-Gab de364175eb
Unique ids in blocks with nanoid (#1667)
* feat: Add unique ids for each block

* fix: Improve code based on code review

* feat(block ids): Use nanoid library for block id generation

* Remove unused files

* Add tests

* Fix lint & test

* fix: Remove unnecessary id generation, use nanoid(10) to shorten the id, add changelog and some documentation

Also improved some documentation along the lines and fixed linting

* Update copy-paste.spec.ts

* fix id generation, add api method

* Update blocks.spec.ts

* update tests

Co-authored-by: cobb <kebincheng@yeah.net>
Co-authored-by: George Berezhnoy <gohabereg@users.noreply.github.com>
Co-authored-by: Georgy Berezhnoy <gohabereg@gmail.com>
Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
2021-04-27 16:33:00 +03:00
Taly ef0c7d76a7
Publish the latest version with a next tag too (#1668)
resolves #1659
2021-04-21 19:21:26 +03:00
github-actions[bot] 6ac58c3935
Bump version up to 2.20.2 (#1655)
* Bump version

* Update version

Co-authored-by: github-actions <action@github.com>
Co-authored-by: Georgy Berezhnoy <gohabereg@gmail.com>
2021-04-15 21:32:55 +03:00
Taly 472d950b0b
refactoring: notifier is util now (#1628)
* Notifier is util now

* Update CHANGELOG.md

* Update notifier.ts

* Update cypress.yml

* Revert "Update cypress.yml"

This reverts commit a2c8331314.

* Update CHANGELOG.md
2021-04-15 20:20:21 +03:00
George Berezhnoy 2996affb0a
Fix #1640 (#1649)
* Fix #1640

* Update changelog

* Fix typo
2021-04-14 19:07:16 +00:00
Tomoyuki Hata 04749ed098
Prevent the leak of codex-tooltip when Editor.js is destroyed (#1590)
* Prevent the leak of codex-tooltip when Editor.js is destroyed

* Cover destroy() function

Thanks, @hata6502
2021-04-14 17:49:22 +03:00
github-actions[bot] 32ac52a62f
Bump version up to 2.20.1-rc.0 (#1608)
* Bump version

* Bump version

* Bump to 2.20.1

Co-authored-by: github-actions <action@github.com>
Co-authored-by: Georgy Berezhnoy <gohabereg@gmail.com>
2021-04-09 13:30:51 +03:00
George Berezhnoy 2c77edb457
Add cypress workflow (#1638)
* Add cypress workflow

* Setup different browsers

* Pull tools

* Update ff image

* Fix test

* Adopt tests

* Fix eslint
2021-04-08 23:15:42 +03:00
dependabot[bot] 3b20c4a139
Bump y18n from 4.0.0 to 4.0.3 (#1639)
Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.3.
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/y18n-v4.0.3/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/compare/v4.0.0...y18n-v4.0.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: George Berezhnoy <gohabereg@users.noreply.github.com>
2021-04-08 22:58:15 +03:00
Tomoyuki Hata d5217067a6
Refactoring based on ESLint (#1637)
* Refactoring based on ESLint

* Update .eslintrc

Co-authored-by: George Berezhnoy <gohabereg@users.noreply.github.com>
2021-04-08 22:53:11 +03:00
George Berezhnoy 14acef136c
Fix copy in FireFox (#1632)
* Fix copy in FireFox

* Add test cases

* Eslint fix

* Improve readability

* fix eslint
2021-04-08 22:19:49 +03:00
Liam Martens d5aaa56ca0
[Bug] n.closest() not a function #1317 (#1600)
* Release 2.19.2 (#1597)

Save 2.19.2 changes

* 1317
The selection node sometimes ends up being the ShadowRoot which does not have the closest method.
In case it is the shadowroot - I believe we can assume the selection is not at the editor zone

Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
Co-authored-by: George Berezhnoy <gohabereg@users.noreply.github.com>
2021-04-08 22:13:00 +03:00
Tomoyuki Hata aa5a3d05f3
Create a new block when clicked at the bottom (#1605)
* Create a new block when clicked at the bottom

* Fix for 2.20.0

Co-authored-by: George Berezhnoy <gohabereg@users.noreply.github.com>
2021-04-08 21:38:08 +03:00
Tomoyuki Hata 9cdda110da
Refactoring based on LGTM (#1635)
* Refactoring based on LGTM

* Fixed jsdoc/no-undefined-types

Co-authored-by: George Berezhnoy <gohabereg@users.noreply.github.com>
2021-04-08 21:32:49 +03:00