Commit graph

680 commits

Author SHA1 Message Date
Ilya Maroz 3d095821ca
test: rewrite cases after review 2022-12-07 20:56:41 +00:00
Ilya Maroz b5f7fb6d96
Merge branch 'feature/collaborative-editing' of github.com:codex-team/editor.js into test/unit-tests-for-collab-modules 2022-12-01 16:55:15 +00:00
Ilya Maroz a5bea55d35
Merge branch 'next' of github.com:codex-team/editor.js into feature/collaborative-editing 2022-12-01 16:54:26 +00:00
Ilya Maroz cd46080d10
test: add cases for collaborative editing managers 2022-12-01 13:52:37 +00:00
github-actions[bot] 320a30afcc
bump: 2.26.0 is ready (#2189)
* Bump version

* Update package.json

Co-authored-by: github-actions <action@github.com>
Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
2022-11-29 22:03:33 +04:00
Peter Savchenko 509023e307
chore(submodule): paragraph submodule updated with the new icons (#2191)
* do not show tooltip on mobile

* paragraph submodule updated with the new icon
2022-11-29 15:01:02 +04:00
Peter Savchenko d56c07c3dc
chore(icons): icons size increased for mobile devices (#2190)
* popover icons size increased on mobile devices

* update icon size on mobile

* some mobile styles improvements

* inline tools click on mobile devices improved
2022-11-29 12:02:23 +04:00
Peter Savchenko 1a72d2153b
fix(toolbox): shortcuts appearance fixed, icons became optional (#2188)
* fix(toolbox): shortcuts appearing fixed, icons became optional

* rm only from test

* Update tools.spec.ts

* rm useless tests

* Update CHANGELOG.md
2022-11-29 01:57:48 +04:00
github-actions[bot] 04118b2d6e
bump: 2.26.0-rc.7
Co-authored-by: github-actions <action@github.com>
2022-11-28 20:28:41 +04:00
Peter Savchenko 73c9bdf40b
fix(block-events): split block with removing of selected text fragment (#2186)
* fix(block-events): split block with removing of selected text fragment

* Update BlockEvents.spec.ts
2022-11-28 20:23:30 +04:00
github-actions[bot] a8026e6829
Bump version (#2183)
Co-authored-by: github-actions <action@github.com>
2022-11-26 11:37:53 +04:00
Peter Savchenko 0bf5007f6c
fix ci (#2182) 2022-11-26 11:32:04 +04:00
github-actions[bot] 6088aaead6
bump: 2.26.0-rc.5
Co-authored-by: github-actions <action@github.com>
2022-11-26 10:48:28 +04:00
dependabot[bot] cdaf10a58f
build(deps): bump moment from 2.29.2 to 2.29.4 (#2104)
Bumps [moment](https://github.com/moment/moment) from 2.29.2 to 2.29.4.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/moment/moment/compare/2.29.2...2.29.4)

---
updated-dependencies:
- dependency-name: moment
  dependency-type: indirect
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
2022-11-26 10:42:23 +04:00
Peter Savchenko e048c4d46b
fix release drafter 2022-11-26 03:13:48 +04:00
github-actions[bot] fb86d71828
bump: 2.26.0-rc.4
Co-authored-by: github-actions <action@github.com>
Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
2022-11-26 03:09:00 +04:00
Valerii Varankin 811a41366b
Fix: check for Files substitutions before handling files paste (#1928)
* FIX: Paste text from MS Word instead of image

* changelog added

* Update CHANGELOG.md

* rm submodule change

Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
2022-11-26 01:24:17 +04:00
Peter Savchenko 0d0f9e8de2
chore(submodules): submodules updated, changelog fixed (#2179)
* submodules updated

* changelog updated
2022-11-26 00:53:08 +04:00
azibodusi osain 9b7da504e4
feat(blocks-api): the insert() method now has the optional id param
* refactor: added id to the insert method  to allow user pass and existing id to the method

When  working with multiple editor at the same and need to link  all  blocks to each editor and keeping the same ids in all.

* moved the position of the block_id params to the end to aaviod breaking cha

* doc: updated  the  documentation on insert method params

* refactor :  formatted  the code to  add/remove  space

* refactor: moved the position of the `id` and its description to the respective position

* refactor: rollback to previous commit

* added back the removed default value

* fix error, remove garbage

* test added, changelog added

Co-authored-by: Umang G. Patel <23169768+robonetphy@users.noreply.github.com>
Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
2022-11-25 23:59:38 +04:00
github-actions[bot] a1071b7229
Bump version (#2178)
Co-authored-by: github-actions <action@github.com>
2022-11-25 22:29:01 +04:00
Peter Savchenko b1b582b150
feat(icons): codex icons package is used instead of svg sprite (#2173)
* chore(icons): migrating to the coded icon pack

* conversion toolbar

* inline toolbar, part 1

* inline-link tool has the new icons

* added a test for creating a link by Enter keydown in link input

* rm last icons, svg sprite, loaders

* rollback .ce-settings styles

* Update CHANGELOG.md

* Update settings.json
2022-11-25 22:26:23 +04:00
github-actions[bot] f0f8f8fcb5
Bump version (#2177)
Co-authored-by: github-actions <action@github.com>
2022-11-25 22:01:02 +04:00
Peter Savchenko 3272efc3f7
chore(linting): eslint updated, code linted (#2174)
* update eslint + autofix

* a bunch of eslint fixes

* some spelling & eslint fixes

* fix some eslint errors and spells

* Update __module.ts

* a bunch of eslint fixes in tests

* Update cypress.yml

* Update cypress.yml

* fix cypress docker image name

* fixes for tests

* more tests fixed

* rm rule ignore

* rm another ignored rule

* Update .eslintrc
2022-11-25 21:56:50 +04:00
github-actions[bot] 19f3790cfd
Bump version (#2169)
Co-authored-by: github-actions <action@github.com>
2022-11-22 00:30:24 +04:00
Umang G. Patel f659015be6
fix(tools-api): pasteConfig.tags now supports a sanitize config (#2100)
* event handlers function added

* santization config added

* integrate with paste event

* lint removed

* remove old changes

* object based sanitization configuration support

* paste config updated

* logic updated

* extract tag name from paste-config

* tool tags added

* multi tag sanitization added

* the comments added

* lint removed

* Update types/configs/paste-config.d.ts

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

* update the changes

* lint removed\

* return empty array by get tags

* submoduble reset

* Update src/components/modules/paste.ts

Co-authored-by: Jorge <46056498+jorgectf@users.noreply.github.com>

* changelog added

* tool comments added

* chore: docs, code comments updated

* fix: xss in processDataTransfer

* base tests added

* test added

* rm 'only' from test suite

* rm log

* reorder test

Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
Co-authored-by: Jorge <46056498+jorgectf@users.noreply.github.com>
2022-11-22 00:28:53 +04:00
ilyamore88 665d5d1388
Merge branch 'next' of github.com:codex-team/editor.js into feature/collaborative-editing 2022-11-16 19:14:42 +00:00
github-actions[bot] cd06bfc9c5
Bump version up to 2.26.0-rc.0 (#2105)
* Bump version

* Update package.json

* Update changelog

Co-authored-by: github-actions <action@github.com>
Co-authored-by: Tanya Fomina <fomina.tatianaaa@yandex.ru>
2022-11-03 22:39:51 +03:00
Tatiana Fomina 581289c03e
Block tunes as a popover (#2091)
* Default tunes to popover

* Add the rest of default tunes

* Add popover

* Cleanup

* Rename custom content

* Cleanup

* Add ability to open block settings upwards

* Fix tests

* Cleanup default tunes

* Rename and cleanup

* Add ability to display rendered custom tunes

* cleanup

* Rename

* Add flag to close tunes popover

* Cleanup

* i18n

* Cleanup

* Fix build and tests

* Fix for iframe

* Add comments

* Display active item, move closeOnActivate to popover

* Add confirmation support to popover

* Handle boolean value in confirmation param

* Clarify flippable logic in popover

* Comments

* Pass editor element as a param of popover constructor

* Fix readability

* Tests

* Fix flipper for confirmation element

* Update confirmation config structure

* Rename onClick to onActivate

* Fix tests and build

* Make confirmation props optional

* Simplify processing tunes

* Renamings

* Fix text block tunes

* Docs

* Update event type

* Move enabling confirmation state to separate method

* move popover types

* Unhardcode color

* Support toggling

* Add support of disabled items

* Fix tab in empty block leading to selecting second item in popover

* Remove margins for styles api settings button class

* Fix arrow navigation between blocks after opening block tunes

* Cleaup in default tunes code

* Fix chaining confirmations

* Colors

* Types

* Change the way flippable elements of popover custom area are set

* Remove borders around popover icons

* Fix untabbable inline toolbar

* Fix locked scroll after closing tunes popover on mobile

* Cleanup

* Set max popover width

* Make popover icon's border outside

* Fix tab issue

* Fix focus/hover issue

* Reformat

* Cleanup

* Fix opening block tunes via keyboard

* Add disableSpecialHoverAndFocusBehavior

* Add deprecated comment

* Cleanup

* Fix popover active state

* Fix checklist deletion with confirmation

* Fix checklist deletion 2

* Fix popover focus

* Fix popover items being impossible to flip after searching

* Fix popover item highlighting issue

* Update flipper.spec.ts

* Fixes after review

* Add Tunes Api tests

* Fix multiple popover entries configured by one tune

* Add tool's renderSettings() tests

* Add popover confirmation state test

* Fix popover width on mobile

* Add popover tests

* Add changelog and update version

* Update changelog

* Fix block tunes being unable to open after tune activation

Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
2022-11-03 20:52:33 +03:00
Ilya Maroz a513e1079a
feat(collaborative): function for getting changes from string (#2101)
* create function for getting changes from a string

* remove useless variables

* add more test cases

* refactor: return array of operations

* refactor: rename function, conditions, add docs

* refactor: use interfeces, move them to separate file, add comments

* refactor: rename test cases

* refactor: rename test cases

* refactor: change types schema

* refactor: rename function

* test: add the case for multiple changes
2022-09-06 11:32:38 +01:00
ilyamore88 0f77b7586d
Merge branch 'next' of github.com:codex-team/editor.js into feature/collaborative-editing
 Conflicts:
	src/components/utils.ts
2022-09-01 00:13:23 +01:00
dependabot[bot] 39c4114b97
build(deps): bump terser from 4.6.12 to 4.8.1 (#2103)
Bumps [terser](https://github.com/terser/terser) from 4.6.12 to 4.8.1.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/commits)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-20 09:32:54 +03:00
Peter Savchenko f7368edee3
Roadmap updated 2022-06-22 19:48:15 +03:00
Tanya 6c0555a322
[Feature] Multiple toolbox items for single tool (#2050)
* the popover component, vertical toolbox

* toolbox position improved

* popover width improved

* always show the plus button

* search field added

* search input in popover

* trying to create mobile toolbox

* FIx mobile popover fixed positioning

* Add mobile popover overlay

* Hide mobile popover on scroll

* Tmp

* feat(toolbox): popover adapted for mobile devices (#2004)

* FIx mobile popover fixed positioning

* Add mobile popover overlay

* Hide mobile popover on scroll

* Alter toolbox buttons hover

* Fix closing popover on overlay click

* Tests fix

* Fix onchange test

* restore focus after toolbox closing by ESC

* don't move toolbar by block-hover on mobile

Resolves #1972

* popover mobile styles improved

* Cleanup

* Remove scroll event listener

* Lock scroll on mobile

* don't show shortcuts in mobile popover

* Change data attr name

* Remove unused styles

* Remove unused listeners

* disable hover on mobile popover

* Scroll fix

* Lint

* Revert "Scroll fix"

This reverts commit 82deae543e.

* Return back background color for active state of toolbox buttons

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

* Vertical toolbox fixes (#2017)

* Replace visibility property with display for hiding popover

* Disable arrow right and left keys for popover

* Revert "Replace visibility property with display for hiding popover"

This reverts commit af521cf6f2.

* Hide popover via setting max-height to 0 to fix animation in safari

* Remove redundant condition

* Extend element interface to avoid ts errors

* Do not subscribe to block hovered if mobile

* Add unsubscribing from overlay click event

* Rename isMobile to isMobileScreen

* Cleanup

* fix: popover opening direction (#2022)

* Change popover opening direction based on available space below it

* Update check

* Use cacheable decorator

* Update src/components/flipper.ts

Co-authored-by: George Berezhnoy <gohabereg@users.noreply.github.com>

* Fixes

* Fix test

* Clear search on popover hide

* Fix popover width

* Fix for tests

* Update todos

* Linter fixes

* rm todo about beforeInsert

because I have no idea what does it mean

* i18n for search labels done

* rm methods for hiding/showing of +

* some code style update

* Update CHANGELOG.md

* make the list items a little bit compact

* fix z-index issue caused by block-appearing animation

also, improve popover padding for two reasons:

- make the popover more consistent with the Table tool popover (in future, it can be done with the same api method)
- make popover looks better

* Some progress

Use overriden config

tmp

* Cleanup

* Proceed cleanup

* Update tool-settings.d.ts

* Get rid of isToolboxItemActive

* Get rid of key

* Filter out duplicates in conversion menu

* Rename hash to id

* Change function for generating hash

* Cleanup

* Further cleanup

* [Feature] Multiple toolbox items: using of data overrides instead of config overrides (#2064)

* Use data instead of config

* check if active toolbox entry exists

* comparison improved

* eslint fix

* rename toolbox types, simplify hasTools method

* add empty line

* wrong line

* add multiple toobox note to the doc

* Update toolbox configs merge logic

* Add a test case

* Add toolbox ui tests

* Update tests

* upd doc

* Update header

* Update changelog and package.json

* Update changelog

* Update jsdoc

* Remove unused dependency

* Make BlockTool's toolbox getter always return an array

* Fix for unconfigured toolbox

* Revert "Fix for unconfigured toolbox"

This reverts commit dff1df2304.

* Change return type

* Merge data overrides with actual block data when inserting a block

* Revert "Merge data overrides with actual block data when inserting a block"

This reverts commit eb0a59cc64.

* Merge tool's data with data overrides

* Move merging block data with data overrides to insertNewBlock

* Update changelog

* Rename getDefaultBlockData to composeBlockData

* Create block data on condition

* Update types/api/blocks.d.ts

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

* Update src/components/modules/api/blocks.ts

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

Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
Co-authored-by: George Berezhnoy <gohabereg@users.noreply.github.com>
2022-06-17 18:31:55 +03:00
Ilya Moroz 096517b1fd
[Feature] Add tests of state manager (#2023) 2022-05-15 23:08:59 +03:00
Tanya c1d7744b8d
[Fix] Stop jumping to block start on toolbox close (#2055)
* Stop jumping to block start when on toolbox close

* Update changelog and version

* Set caret on esc press

* Update package.json

Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
2022-05-14 00:20:42 +08:00
Tanya Fomina 8fec2e71c3
[Fix] Toolbox prevents text selection (#2051)
* Add padding only to opened popover

* Update version and changelog

* Update docs/CHANGELOG.md

Co-authored-by: Ilya Moroz <37909603+ilyamore88@users.noreply.github.com>

* Use pointer event approach

Co-authored-by: Ilya Moroz <37909603+ilyamore88@users.noreply.github.com>
2022-05-06 13:26:52 +03:00
Ilya Moroz e6db8d5140
[Feature] Add state manager (#2018)
* add state manager with demo file

* remove initial state

* move Store type to Store.ts

* add new actions

* change store schema

* add docs

* type -> interface, add deepCopy function

* move types to the /types/ folder

* rename types files, change state type (add blocks: key)

* fix createStore.ts func

* add documentation for reducer

* use BlockMutationType instead of ActionType

* add doc

* deep copy of initial state

* add doc for createStore

* Apply suggestions from code review

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

* rename `reducer` to `blocksReducer`

* add a listener type, pass changed state to the listener

Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
2022-05-05 14:26:04 +03:00
Umang G. Patel f2b19cc766
update the script to support windows (#2033) 2022-05-01 18:57:40 +05:30
Peter Savchenko 07ea1ef035
chore: update the roadmap at the readme (#2043)
* Update text-variant-tune

* Update README.md

* Update README.md
2022-05-01 15:52:29 +03:00
github-actions[bot] 3cbe128af9
Bump version up to 2.24.2 (#2041)
* Bump version

* Change version to the 2.24.2

Co-authored-by: github-actions <action@github.com>
Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
2022-05-01 15:32:08 +03:00
Peter Savchenko 6a15cc55c0
fix(#2036): scrolling issue with block hovering (#2042)
* fix scrolling issue caused by the popover.hide()

* Update popover.ts

* Update CHANGELOG.md

* upd codeowners

* naming of isShown improved
2022-05-01 15:09:16 +03:00
Tanya Fomina 8ae8823dcd
fix(ui): Prevent scrolling top when opening toolbox on mobile (#2034)
* Fix scrolling issue on mobile when locking scroll on body

* Simplify

* Fix typo

* Add popup example

* Update changelog

* update popup example page

* Use hard scroll lock only for ios

* Update version in changelog

* Remove unused css class name

Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
2022-05-01 14:43:56 +03:00
Tanya Fomina 96c0bcb573
fix(ui): toolbox items labels i18n (#2031)
* Fix toolbox item label translation

* Update version

* Update changelog

* Update docs/CHANGELOG.md

Co-authored-by: George Berezhnoy <gohabereg@users.noreply.github.com>

* Add fallback for missing toolbox title

* Update docs/CHANGELOG.md

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

* Add test

* Add testcase for missing toolbox title

Co-authored-by: George Berezhnoy <gohabereg@users.noreply.github.com>
Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
2022-04-28 19:26:47 +03:00
github-actions[bot] 8bf4dcde9f
Bump version up to 2.24.0 (#1955)
* Bump version

* Update package.json

Co-authored-by: github-actions <action@github.com>
Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
2022-04-26 22:51:33 +03:00
Oleh 25f7ec2456
Fixed sanitizer on pasting HTML (#1686)
* Fixed pasting sanitizer

* Actualized code

* Update CHANGELOG.md

Co-authored-by: Oleh Kotyay <o.kotyay@ideil.com>
Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
2022-04-26 22:42:23 +03:00
dependabot[bot] 13b8e11a21
Bump cached-path-relative from 1.0.2 to 1.1.0 (#1948)
Bumps [cached-path-relative](https://github.com/ashaffer/cached-path-relative) from 1.0.2 to 1.1.0.
- [Release notes](https://github.com/ashaffer/cached-path-relative/releases)
- [Commits](https://github.com/ashaffer/cached-path-relative/commits)

---
updated-dependencies:
- dependency-name: cached-path-relative
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-26 20:43:02 +03:00
dependabot[bot] 0e30d8781e
Bump moment from 2.29.1 to 2.29.2 (#2016)
Bumps [moment](https://github.com/moment/moment) from 2.29.1 to 2.29.2.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/moment/moment/compare/2.29.1...2.29.2)

---
updated-dependencies:
- dependency-name: moment
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
2022-04-26 20:41:34 +03:00
dependabot[bot] 06900968ac
Bump color-string from 1.5.3 to 1.9.1 (#2027)
Bumps [color-string](https://github.com/Qix-/color-string) from 1.5.3 to 1.9.1.
- [Release notes](https://github.com/Qix-/color-string/releases)
- [Changelog](https://github.com/Qix-/color-string/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Qix-/color-string/commits/1.9.1)

---
updated-dependencies:
- dependency-name: color-string
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-26 20:38:49 +03:00
dependabot[bot] ee28354cb4
Bump browserslist from 4.12.0 to 4.20.3 (#2028)
Bumps [browserslist](https://github.com/browserslist/browserslist) from 4.12.0 to 4.20.3.
- [Release notes](https://github.com/browserslist/browserslist/releases)
- [Changelog](https://github.com/browserslist/browserslist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/browserslist/browserslist/compare/4.12.0...4.20.3)

---
updated-dependencies:
- dependency-name: browserslist
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-26 20:37:56 +03:00
dependabot[bot] 1b84f66219
Bump minimist from 1.2.5 to 1.2.6 (#2011)
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-26 20:14:01 +03:00