Commit graph

142 commits

Author SHA1 Message Date
Taly f841c96aeb
Update inline-toolbar and settings buttons margins (#645)
* Update inline-toolbar and settings buttons margins

* Bump version

* pull master to submodules

* Add Raw Tool

* Really add Raw tool

* Remove submodule

* Add RAW tool

* Update CHANGELOG.md
2019-03-14 16:15:15 +03:00
Taly ef50f5cf5a
Block tunes margins now better works with more than 3 buttons (#643)
* Fix settings margins

* Remove "not last-of-type" option for settings buttons

* Update CHANGELOG.md
2019-03-11 19:36:59 +03:00
George Berezhnoy afa158d5db
Fix issue with pasting html to non-initial tools (#639)
* Fix issue with pasting html to not initial tools

* Bump version and add changelog
2019-03-08 08:41:58 +03:00
George Berezhnoy b2d85d3ae6
Fix paste module to support Microsoft Edge (#640) 2019-03-08 08:33:29 +03:00
George Berezhnoy d9bb7ff958
Rename plugins org (#633)
* Rename plugins repo

* Update submodules` remotes

* Bump version
2019-03-02 21:45:03 +03:00
horoyami 19d228db17
Redesign of the scrolling zones (#634)
* update table

* Fix mouse button

* scrollZones

* build

* zones resize
2019-03-02 00:34:08 +03:00
Murod Khaydarov 1e5e77925f
Clear focus on multiple editor instances (#632)
* Clear focus on multiple editor instances

* update

* update bundles

* close inline toolbar
2019-03-01 18:10:33 +03:00
Murod Khaydarov 681e8a5827
Fix shortcut execution on several Editor instances (#631)
* Fix shortcut execution on several Editor instances

* fix problem before handling cmd+a
2019-03-01 15:09:12 +03:00
horoyami 6cd011140c
Selection is available only for the main mouse button (#629)
* update table

* Fix mouse button
2019-02-28 20:04:56 +03:00
George Berezhnoy 75dbc91f53
API shorthands (#627)
* Api shorthands

closes #612

* Remove docs about events

* Update embed submodule

* Update example
2019-02-28 19:01:41 +03:00
George Berezhnoy 69a5c21bb6
Rename to Editor.js (#625)
* Rename to Editor.js in package, comments and docs

* More changes

* Done with renaming in code, docs, and comments

* Revert renaming of tools org

* Update submodules

* Changes due comments

* Fix double slash

* editorjs -> @editorjs/editorjs

* Update package.json

Co-Authored-By: gohabereg <gohabereg@users.noreply.github.com>

* Update webpack.config.js

Co-Authored-By: gohabereg <gohabereg@users.noreply.github.com>

* Update bundle
2019-02-28 14:01:32 +03:00
George Berezhnoy 758c5080df Add Toolbox tooltip (#604)
* Add tooltip

* styles updated

* updates

* Update CHANGELOG.md

* rm map

* update

* upd pkg
2019-02-27 13:25:09 +03:00
Murod Khaydarov 7aa35bb7dd
bump version (#626)
* bump version

* prevent backspace on firefox
2019-02-27 13:15:40 +03:00
George Berezhnoy 712256e23d
Handle paste only on initial Blocks (#623) 2019-02-26 00:38:45 +03:00
Murod Khaydarov 8d6ac74b57
Issue-616: Handle backspace, cmd+X, cmd+C and enter on RectangleSelection (#617)
* cut-n-copy multiple selection with rectangle

* use pop instead of shift

* enter and backspace behavior with rectangeSelection

* bump version and minify bundle

* optimize code
2019-02-25 17:19:30 +03:00
Murod Khaydarov e6adb4cb5b
[Update]: Migrate to postcss-preset-env which includes postcss-cssnext (#615)
* Use cssnext to cut cssnext variable. By default cssnext includes autoprefixes

* bump bundle version

* migrate to postcss-preset-env

* update changelog and minimize css
2019-02-19 18:42:34 +03:00
horoyami beeeef0914
Mouse selection (#574)
* Mouse selection
2019-02-19 11:49:19 +03:00
George Berezhnoy e4b0ca9b71
Prevent default behaviour on backspace (#607) 2019-02-11 11:36:41 +03:00
George Berezhnoy b46369bff0
Caret API (#605)
* Caret API

* Check block existence before setting the caret

* Update docs/api.md

Co-Authored-By: gohabereg <gohabereg@users.noreply.github.com>

* Update docs/api.md

Co-Authored-By: gohabereg <gohabereg@users.noreply.github.com>

* Update docs/api.md

Co-Authored-By: gohabereg <gohabereg@users.noreply.github.com>

* Update CHANGELOG.md
2019-02-01 12:47:25 +03:00
George Berezhnoy 8ca49fa6f5
Fix Block inputs selector to include inputs without type attribute (#599) 2019-01-25 01:10:06 +03:00
horoyami 95734bb2f2
FIx version and changelog
* version fix
2019-01-24 18:50:27 +03:00
horoyami 3842595c24
Fix error with fake selection (#595)
* fix bag fakeSelection (#590)
2019-01-22 14:04:49 +03:00
Polina Shneider fc3e146764
Validate saved data (#591)
* Specify submodule branch for test

* Change branch for testing convenience

Just run: git submodule update --remote

* Added checklist submodule for test

* Attempt to validate data on save

* Rewrite promise.then to async/await

* Move validate logic to saver

* Remove extra space

* Fix tabs

* Don't need async/await here

* Remove submodule

* Improve logging, remove empty blocks from data array

* Remove warning

* Loop over blocks only once

* Make validate non-async

* Get rid of await Promise.all

* Make validate async

* Call plugin's validate method with await

* Add docs

* Update docs

* Make separate function for tools validation

* Rename method

* Add data types interfaces

* Improve logging

* Desctructure extraction object

* Remove useless argument

* Update README and changelog

* Make separate changelog for version

* Increase version

* Bump version

* Keep logs at their places

* Fix logs order

* Pull submodules

* Improve logs grouping

* log styles improved

* Describe allExtractedData type

* Improve JSDoc
2019-01-12 19:39:43 +03:00
Peter Savchenko aab317895b
Responsive layout (#593)
* Mobile adaptation beginned

* mobile ready

* Narrow mode supported

* update version

* disable narrow mode testing

* prod build

* rm unnecessary code

* Update src/styles/variables.css

* rm unused code

* add viewport

* disable narrow mode on mobile

* mobile: add bg to current block

* add paddings for highlighted block

* rm changelog
2019-01-12 05:47:19 +03:00
George Berezhnoy 63a82d3424
Improve caret behaviour (#589) 2019-01-12 04:57:37 +03:00
George Berezhnoy da9255a98d
Enable editor autofocus (#581) 2019-01-12 03:44:43 +03:00
George Berezhnoy e8d43c8fc7
Handle paste on images and blocks w\o inputs (#583) 2019-01-12 03:34:44 +03:00
Murod Khaydarov d00412e1df
[Shortcuts]: CMD+X (#592)
* [Shortcuts]: CMD+X

* shortcuts must be in BlockManager

* small code improvements

* compact bundle

* insert new block in case of cmd+x

* prevent default

* suggested changes
2019-01-11 23:53:36 +03:00
Peter Savchenko 71a8a99937
Add changelog (#571)
* Changelog added

* note about html janitor

* update changelog

* update patch

* even
2018-12-19 14:52:21 +03:00
George Berezhnoy c93ed2501b
Add tools` titles for Toolbox (#540)
* Add tools` titles for Toolbox

* Bump version

* Use isEmpty method to check object emptiness

* Improve isEmpty method

* Override toolbox settings from editor config
2018-12-04 20:24:41 +03:00
George Berezhnoy 669c11eaa5
Paste handling improvements (#534)
* Make on paste callback non-static method

* Add docs

* change tools.md header levels

* some docs improvements

* upd docs

* Types improvements

* add image tool for testing

* Fix file drag'n'drop

* improve log on paste

* Update submodules

* Update bundle

* Update paragraph submodule

* Fix some bugs with blocks replacement
Remove tag from HTMLPasteEvent

* Use production webpack mode

* minimize: true

* Update docs

* Update submodules

* Update bundle
2018-11-29 12:16:06 +03:00
Peter Savchenko feace16fc1
Remove contentless and irreplaceable (#535)
* Remove contentless and irreplacable settings

* update version
2018-11-24 18:47:49 +03:00
George Berezhnoy bcdfcdadbc
Move to typescript (#474)
* Move all modules to ts

* It works

* Update README.md

Co-Authored-By: gohabereg <gohabereg@users.noreply.github.com>

* Interfaces

* Interfaces

* Move depending interfaces to external types

* Update README.md

* update tools

* add some docs

* Add some fixes

* Add desctiprion for Block declaration and Core properties

* Fixes due comments
:

* Remove Block from external types

* Bump version

* Update src/components/modules/tools.ts

Co-Authored-By: gohabereg <gohabereg@users.noreply.github.com>

* Update src/components/core.ts

Co-Authored-By: gohabereg <gohabereg@users.noreply.github.com>

* Rename gteBlockHTMLByIndex to getBlockByIndex

* Remove unnecessary constructors

* Clean up bindEvents method

* Add InlineToolConstructable interface

* Delete legacy notifications class

* Fix zero-configuration bugs

* Update inline tools and block tunes constructors
2018-11-23 19:11:50 +03:00
Taly b8ce51d77f
Notifier module and API (#486)
* Notifier module and API

* add docs

* update notifier module

* bump version

* impr image module

* git cache cleared

* remove image submobule

* add sumbodule
2018-11-10 15:47:25 +03:00
Murod Khaydarov 3f8c7fbb7b
Sanitizer features (#467)
* Sanitizer features

* move to ts, use sanitizer module to clean taintstring

* Sanitizer is ready

* it works

* Code refactored (#476)

* Use new features for paste handling

* Fix asterix

* Add types and some comments

* Use any type for deepSanitize method

* Make sanitize property static and use apiSettings object

* Use sanitize for single-block pasting

* Fix comment

* little updates

* rename sanitize in inline-tools docs

* Update pattern handling

* Use public getter for available tools

* Fix typo
2018-10-23 10:34:00 +03:00
Murod Khaydarov 9786674194
update doc 2018-10-11 12:16:32 +03:00
Murod Khaydarov ff80ca6e92
api sanitizer improvements (#457)
* api sanitizer improvements

* update

* sanitize recursively

* clear from logs and update comments

* optimize

* update

* perfect recursive method

* update request

* upd

* update docs

* update comments

* update

* update docs

* update last comment

* update

* update docs

* update docs

* update

* upd docs

* add extra condition

* update

* update docs link
2018-10-01 14:07:51 +03:00
George Berezhnoy 577da8fa22
Drag'n'drop support (#445)
* moving caret initial

* small improvements

* last changes, added docs

* requested changes

* implement getters instead of functions in block cursors

* last requested changes

* caret module docs and last improvements

* update docs

* upgrade request

* update docs

* upd

* todo on delays

* Sanitizer docs

* split func upd

* split blocks update

* up docs

* Listeners Module: initial

* listener module updates

* split is ready

* update

* start to make merge

* upd

* split general upd

split is ready

* ups

* keyboard module update

* BlockManager removed keyboard handler

* commit before merging rewriting2.0

* general upd split

* Documentation upd

* document + listener upd

* upd doc

* documentation upd

* doc upd

* listener upd

* update algh extract fragm

* upd extractRangeContent

* upd dom.js

* keyboard upd (shift + enter & enableLineBreaks)

* upd enter pressed

* keyboard.js upd

* enter pressed upd

* documenation added

* documentation upd

* Toolbar: settings zone added. (#252)

* Toolbar: settings zone added.

* update some comments

* Making a Toolbar

* delete block

* dom improvements and merging blocks

* merge and split improvements

* fix merging

* do not remove block if block contains media

* optimize code

* caret behaviour improved

* up

* up

* merging blocks. Now plugins handles this cases

* mergeable getter

* save

* up

* dom getdeepestnode improvements

* improve getDeepest node method one more time

* upd

* Deal with it

* improve isAtStart

* improve docs

* use smart isAtStart and isAtEnt method in navigateNext/navigatePrevious

* improve docs

* fix bug in $.isEmpty, improve keydown

* fix isAtEnd

* rollback setCaret code duplication

* improve backspace

* Debug tree walker

* fix tree walker

* small caret fix

* queue ordering

* update bundle

* improve first letter checkup

* doc upd

* update current block index setter

* TypeScript support, Webpack 4, Inline Toolbar beginning (#257)

* Create UI

* Support TypeScript Modules

* remove tmp files

* migrate to 2-spaced tabs

* Add TS Linter

* Inline Toolbar moving (#258)

* Inline Toolbar moving

* simplify code

* Check is need to show Inline Toolbar

* remove duplicate from doc

* fix doc

* open/close IT

* Close IT by clicks on Redactor

* @guryn going strange

Co-Authored-By: Taly <vitalik7tv@yandex.ru>

* default settings initial

* add move up button to default tunes area

* need to figure out with assets

* Inline Toolbar Tools base example (#260)

* Inline Toolbar Tools base example

* texts fixed

* imrpove texts

* little fixes

* save

* tunes with interface

* add tool settings

* initial api methods

* api is ready

* started writing docs

* Create svg sprite (#261)

* API

* requested changes

* fix conflicts

* add docs

* doc fixes and interface improvements

* update

* API scopes improved

* Deleting block: Initial

* Delete block with confirmation

* Event subscription&unsubscription

* deletion trigger improvements

* small improvements

* Link Inline Tool (#264)

* Link Inline Tool

* api injected

* text improved

* Clear input on the reselection

* little improvements

* Delete tune fixes

* UI: Block Settings, show Plus after Enter keydown (#265)

* Some UI improvements: icons settigns

* Show plus button after split

* decrease autoprefixer

* rename variable

* Revert "Merge branch 'delete-tune-fixes' into rewriting-version2.0"

This reverts commit 779bf5db9e, reversing
changes made to 972eb87d89.

* Delete Tune improvements

* upd

* upd comments

* actualize API docs

* Allow to connect external Inline Tools (#269)

* Allow to connect external Inline Tools

* unhardcode tool's api settings

* Italic inline tool

* update icon size

* upgrade findParentTag function

* add interface selection

* fix cs

* save marker

* bundles

* add todo

* removing wrapper

* update styles

* market -> term

* add comments

* improve code

* descrease margin

* add text block to example

* add line brakes

* remove space

* fix bugs

* fix bug

* umd as a library target

* background -> background-color

if `background` has only `color` then use `background-color`

* Clear API (#274)

* blockManager.clear

* upd

* api bez ebanoj knopki api

* fix assignment

* insert empty block with clear method

* clear and render methods improved

* open saver.save()

* add comments

* update comments

* fix data returned by editor

* rename plugin name field in data object (#276)

* Text tool refactored (#277)

Now it returns strict data format.

* do not add block if tool is not exist (#278)

* do not add block if tool is not exist

* show warning

* add todo

* update warning message

* put message into variable

* Revert "put message into variable"

This reverts commit c1f63894d7.

* update comment

* Module Keyboard rewrited to BlockEvents (#279)

* Module Keydown rewrited to BlockEvents

* move keyup and mouseup to the Block Events

* Move-up tune (#268)

Co-authored-by: khaydarov <murod.haydarov@gmail.com>

* Move up tune initial
* move up tune initial behaviour
* moving up formula, docs and code cleaned
* do not close the toolbar if moving block up
* move nagivate methods to Caret Module
* navigations returns boolean if caret is set
* code improved
* update comments
* disable tune when block index is zero
* provide API with listener module methods
* caret improvements
* add to docs
* update docs and blocks api methods
* docs changes
* small improvements
* swap instead of moves
* update
* fix swap
* remove unused method
* remove useless return value from setToBlock
* improve caret isAtEnd and isAtStart
* improve swap, fix listeners api@off method

* Eslint --fix for project files (#280)

* Header plugin (#281)

* header initial

* fix styles

* eslint fix

* add appendCallback

* add comments

* update styles

* add svgs

* highlight settings buttons

* do not show text plugin in the toolbar

* remove svg

* Fixing caret behaviour. (#282)

Plugins can change their state so that affect on Block's pluginsContent property which is in memory.

* remove useless code

* fix merge

* "MoveDown" tune (#283)

* move down initial

Swap current block with next block and scroll window screen

* check if block is last

added new method to the blocks API that returns blocks count

* fix comments

* animate tune

* add animation when tune is disabled

* requested changes

* remove unused css

* Fix merge function and rename Block's wrapper (#284)

* Fix merge function and rename wrapper

* update

* renew condition

* update

* upd

* Merging blocks: Restore caret position 🤟🤟💪 (#286)

* Merging blocks: Restore caret position 🤟🤟💪

* requested changes

* update removing shadow caret

* hide toolbar and selection on typing (#289)

closes #288

* Editor Instance config Interface (#285)

* create interface for editor config

* use IEditorConfig

* create some interfaces

* add comments

* editor interface

* updates

* update editor interface (#293)

* При перемещении по стрелочкам убирать выделение блока (#296)

* При перемещении по стрелочкам убирать выделение блока

* Add comments

* update comments

* update comment

* update toolbar design (#301)

* Set caret at the end if clicked outsite the block (#305)

* Set caret at last block or create new block at end

* update comment

* fix comments

* Insert new Block when enter pressed on editor area (#307)

* insert new block when enter pressed on editor zone

* extra conditions. Enter must be handled on editors area

* move at editor condition to the Selection method

* closes can return null

* fixing editor area

* do not create new block

* clean example

* updates due to the requested changes

* Add placeholder to contentEditable elements (#306)

* add placeholder to contentEditable elements

* store selection color in a variable

* add placeholder to header block

* Add placeholder to contenteditable only if attribute data-placeholder exists

* remove tool config

* Close toolbar after block is removed (#314)

* makeSettings -> renderSettings (#315)

* Term: new icon, new style. + margin between settings buttons (#316)

Resolves #309

* Tool's renderToolboxIcon function  (#318)

* create renderToolboxIcon

issue was not done

* remove useless span wrapper

* update linters

* update styles

* process click on svg by closest

* remove commented code

* rename function: svgIcon -> toolboxIcon

* add toolboxIcon to docs

* Paste (#259)

* Paste module

* Rewrite paste logic

* Update due comments

* Docs

* Add all block elements

* Sanitize content on paste

* Remove logs and add header handler

* Add comment to dom.js

* Add comment to tools.js

* Split block if paste not at the end

* Update docs

* Update docs

* pidr

* Take Tool name from config

* Update docs

* Label onPaste handler as private

* Resolve conflict

* Replace current block if it is empty (#320)

* Improve Header line-height (#321)

* Fix typo (#324)

* CodeX Editor 2.0

Co-authored-by: Murod Khaydarov <murod.haydarov@gmail.com>
Co-authored-by: Petr Savchenko <specc.dev@gmail.com>
Co-authored-by: George Berezhnoy <gohabereg@gmail.com>
Co-authored-by: Taly Guryn <vitalik7tv@yandex.ru>

* Fix typo

* Installation docs (#325)

close #310

* Module Shortcuts (#317)

* import shortcuts

* node modules works

* enable shortcut for inline tools

* check shortcut existance

* enable shortcuts to Block tools

* set caret to block if block replaced

* enable shortcuts on inline-tools

* improve code

* last changes

* update

* fix

* insert returns block so we can set caret

* use Map instead own structure

* disable shortcut if iniline-toolbar disabled

* update code styles

* remove todo

* upd

* update

* remove settings from insert function

* create interface

* code improvements

* use const instead of let

* upd

* Simple Image Tool (#326)

* Simple Image

* fix pattern

* show tunes` state

* update code

* update code

* upd

* Fix toolbox appearance, tools boxed are clickable (#331)

* Remove toolsConfig from Editor's config (#327)

* fix linters

* remove toolsConfig

* update tool's interfaces

* add comments

* bundles

* remove test headers

* restore commented code

* update tool's interface

* toolConfig -> toolSetting

* fix typos

toolSetting -> toolSettings
toolsSettings -> toolSettings
toolClasses -> toolsClasses

* update code comments

* update installation doc

* update docs

* update dev dep packages (#333)

* Check is paste handler a function only if it exists (#328)

* Toolbar with tab (#330)

* toolbar tabs initial

* leaf initial

* save state

* flip back toolbox items

* enter on toolbox item

* update

* requested changes

* new condfition

* update

* improve animation on leaf

* fix shift+tab flip

* up

* update

* updates

* Consecutive blank lines are forbidden

* Correct choosing next toolbox item

* update

* update comment

* Validate editor's config before initing (#341)

* validate editor's config before initing

* update readme

* @

* update comments

* add function _.isClass

* Styles API (#343)

* StylesAPI

* use styles api in plugins

* add inline styles

* List Tool [new] (#344)

* list tool initial

* list class with settings

* make tool reactive

* final List improvements

* reorder

* tmp update

* unhadrcode enter handler

* updates

* enableLineBreaks also checks

* skip empty items

* select LI by CMD+A, fix backspace in the last item

* improve check for emptiness

* Example page improved (#347)

* Update new example

* imrpove example.html

* updates

* improve code

* Header plugin (#348)

* isFunction function

* use header from cdn

* Improve paste behaviour (#346)

* Improve paste behaviour

* Done

* Don't pass empty items

* Update comment

* move public up

* Remove disallow paste option

* Quote Tool (#329)

* Quote Tool

* Add icon

* Upd

* fix ENTER on quote

* Remove useless code

* items -> blocks (#351)

* use SimpleImage from cdn (#355)

* use simpleimage from cdn

* add comments

* fix spaces

* fix comments

* remove comments

* update simple-image script

* Update text on the example.html (#356)

* use Paragraph Tool from CDN (#357)

* use Paragraph Tool from CDN

* add line brakes

* rename block: paragraph -> text

* Remove _callbacks.js (#358)

* Clear unused files (#359)

* TOOLBAR_ICON_CLASS -> TOOLBAR_ICON (#360)

* TOOLBAR_ICON_CLASS -> TOOLBAR_ICON

* remove defaultConfig

* Delimiter tool (#362)

* Delimiter added

* ашч

* use delimiter from cdn

* Enter on editor (#363)

* Enterpress on editor

* use additional property

* check enter on body

* update

* fix toolbar behaviour

* upd

* update bundle

* remove useless ui property

* update comment

* add Element.prepend() function (#365)

* add Element.prepend() function

* allow to pass element of array to prepend() polyfill

* use List Tool from cdn (#366)

* use List Tool from cdn

* add missing </div> in example.html

* Pass "config" from Tool's settings to Tool's constructor (#367)

* pass config from Tool's settings to Tool's constructor

* reorder elements

* add apiSettings.CONFIG property

* use string as a object's key 😔 (#368)

* update placeholder's styles (#369)

* Add shortcuts for internal tools (#370)

* Add shortcuts for internal tools

* upd doc

* remove articles

* ☹️ guryn asked

* use quote from cdn (#371)

* Add cache to the inline tools (#372)

* use Inline Code Tool from cdn (#375)

* Issue 354 inline tools filter (#376)

* Allow to filter inline tools.

* update example

* update header

* fix endless cycle (#378)

* Destructured options for Inline Tools (#379)

* add destructured options for inline-tools

* temporary disable inlineCode

* remove term sources

* Fix toolbar moving after arrow navigation (#380)

* Fix toolbar moving after arrow navigation

Resolves #361

* move before open

* fix error on Enter after block removing

* add example Tools as submodules (#381)

* add destructured options for inline-tools

* temporary disable inlineCode

* remove term sources

* add inline code Tool as a submodule

* update version of inline-code package

* add Tools as submodules

* update Tools and use destructured params object

* Add constructor() docs

* update package Paragraph Tool

* update installation docs

* Input navigation (#339)

* Quote Tool

* Add icon

* Upd

* Initial setup

* Save changes

* Add scroll and fix input focus

* Add comments

* Rebuild bundle

* fix ENTER on quote

* Fix split behaviour

* Fix

* Navigate only to contentful blocks

* add comments

* Fix backspace on last block

* Remove log

* It works

* Resolve comments

* Use constants

* New readme 🦅 (#386)

* New readme 🦅

* upd text

* Issue 374 (#385)

* Fix issue #374

* Set current block index to -1 if there is no blocks left

* Insert new block if first one was removed by default

* Paragraph as a default Tool in editor; Zero-conf (#389)

* git commit -m "Removed submodule Paragraph"

* add paragraph to core

+ zero-config

* update bundle

* update comment

* remove log

* enable minifying (#390)

* Drop current block index only if there is no selection at the Editor (#388)

* Drop current block index only if there is no selection at the Editor

* Set current node if click ended out of editor

* Small backspace behaviour improvement (#391)

* Small backspace behaviour improvement

* fix caret position

* update from base branch

* Update webpack config

* Migrate to Yarn (#393)

* Migrate to yarn

* Update scripts

* Rewrite helpers classes to TypeScript (#396)

* Add docs and isReady promise (#394)

* set default holderId value (#404)

* Destroyer (#392)

* Initial destroy method

* Add destroy method to api docs

* Export isReady promise in CodexEditor constructor

* Add drag'n'drop support

* Add docs

* Small fix

* Continue merging master :|

* Fixes after merge

* Add styles and improve behavior

* Close inline toolbar and remove dragged content

* Some improvements of paste data processing

* Delete selection content only if drag has been started at editor

* Add comments

* Support of pasting from copy-buffer

* Change header level

* Improvements

* Use isDraNDrop flag

* Update example

* Improve d'n'd behaviour

* git pull for simple-image tool
2018-09-27 21:11:30 +03:00
Murod Khaydarov 7acf321454
Mutation callback (#444)
* modification observer initials

* add debouncer to callback execution

* change feature name

* update

* code improvements

* tslint fixes

* use debouncer from utils

* add types

* upgrade

* fix

* update
2018-09-05 00:34:11 +03:00
Taly 1627f8a3bd update readme (#419)
* update readme

* update readme
2018-08-07 09:32:32 +03:00
Taly a7ebbae7fd
fix missing jsdoc (#406)
* fix missing jsdoc

* add a few words about save and render functions
2018-08-05 16:00:54 +03:00
Peter Savchenko 61242ab6a6
Release 2.0-beta (#387)
* update
* Toolbar, Toolbox, UI (#239)
* Toolbox making
* Add Toolbox buttons click handler
* Toolbar, Toolbox, UI
* Updates
* update css prefix
* trying to write docs
* append callback behaviour
* update request
* update
* empty initial data
* initial saver
* some requested changes
* update request
* requested changes
* upgrade saver
* new improvements
* update
* Caret module: initial
* improvements
* moving caret initial
* small improvements
* last changes, added docs
* requested changes
* implement getters instead of functions in block cursors
* last requested changes
* caret module docs and last improvements
* update docs
* upgrade request
* update docs
* upd
* todo on delays
* Sanitizer docs
* split func upd
* split blocks update
* up docs
* Listeners Module: initial
* listener module updates
* split is ready
* update
* start to make merge
* upd
* split general upd split is ready
* ups
* keyboard module update
* BlockManager removed keyboard handler
* commit before merging rewriting2.0
* general upd split
* Documentation upd
* document + listener upd
* upd doc
* documentation upd
* doc upd
* listener upd
* update algh extract fragm
* upd extractRangeContent
* upd dom.js
* keyboard upd (shift + enter & enableLineBreaks)
* upd enter pressed
* keyboard.js upd
* enter pressed upd
* documenation added
* documentation upd
* Toolbar: settings zone added. (#252)
* Toolbar: settings zone added.
* update some comments
* Making a Toolbar
* delete block
* dom improvements and merging blocks
* merge and split improvements
* fix merging
* do not remove block if block contains media
* optimize code
* caret behaviour improved
* up
* up
* merging blocks. Now plugins handles this cases
* mergeable getter
* save
* up
* dom getdeepestnode improvements
* improve getDeepest node method one more time
* upd
* Deal with it
* improve isAtStart
* improve docs
* use smart isAtStart and isAtEnt method in navigateNext/navigatePrevious
* improve docs
* fix bug in $.isEmpty, improve keydown
* fix isAtEnd
* rollback setCaret code duplication
* improve backspace
* Debug tree walker
* fix tree walker
* small caret fix
* queue ordering
* update bundle
* improve first letter checkup
* doc upd
* update current block index setter
* TypeScript support, Webpack 4, Inline Toolbar beginning (#257)
* Create UI
* Support TypeScript Modules
* remove tmp files
* migrate to 2-spaced tabs
* Add TS Linter
* Inline Toolbar moving (#258)
* Inline Toolbar moving
* simplify code
* Check is need to show Inline Toolbar
* remove duplicate from doc
* fix doc
* open/close IT
* Close IT by clicks on Redactor
* @guryn going strange
* default settings initial
* add move up button to default tunes area
* need to figure out with assets
* Inline Toolbar Tools base example (#260)
* Inline Toolbar Tools base example
* texts fixed
* imrpove texts
* little fixes
* save
* tunes with interface
* add tool settings
* initial api methods
* api is ready
* started writing docs
* Create svg sprite (#261)
* API
* requested changes
* fix conflicts
* add docs
* doc fixes and interface improvements
* update
* API scopes improved
* Deleting block: Initial
* Delete block with confirmation
* Event subscription&unsubscription
* deletion trigger improvements
* small improvements
* Link Inline Tool (#264)
* Link Inline Tool
* api injected
* text improved
* Clear input on the reselection
* little improvements
* Delete tune fixes
* UI: Block Settings, show Plus after Enter keydown (#265)
* Some UI improvements: icons settigns
* Show plus button after split
* decrease autoprefixer
* rename variable
* Revert "Merge branch 'delete-tune-fixes' into rewriting-version2.0"
* Delete Tune improvements
* upd
* upd comments
* actualize API docs
* Allow to connect external Inline Tools (#269)
* Allow to connect external Inline Tools
* unhardcode tool's api settings
* Italic inline tool
* update icon size
* upgrade findParentTag function
* add interface selection
* fix cs
* save marker
* bundles
* add todo
* removing wrapper
* update styles
* market -> term
* add comments
* improve code
* descrease margin
* add text block to example
* add line brakes
* remove space
* fix bugs
* fix bug
* umd as a library target
* background -> background-color
* Clear API (#274)
* blockManager.clear
* upd
* api bez ebanoj knopki api
* fix assignment
* insert empty block with clear method
* clear and render methods improved
* open saver.save()
* add comments
* update comments
* fix data returned by editor
* rename plugin name field in data object (#276)
* Text tool refactored (#277) Now it returns strict data format.
* do not add block if tool is not exist (#278)
* do not add block if tool is not exist
* show warning
* add todo
* update warning message
* put message into variable
* Revert "put message into variable"
* update comment
* Module Keyboard rewrited to BlockEvents (#279)
* Module Keydown rewrited to BlockEvents
* move keyup and mouseup to the Block Events
* Move-up tune (#268)
* Move up tune initial
* move up tune initial behaviour* moving up formula, docs and code cleaned
* do not close the toolbar if moving block up* move nagivate methods to Caret Module* navigations returns boolean if caret is set
* code improved
* update comments
* Eslint --fix for project files (#280)
* Header plugin (#281)
* header initial
* fix styles
* eslint fix
* add appendCallback
* add comments
* update styles
* add svgs
* highlight settings buttons
* do not show text plugin in the toolbar
* remove svg
* Fixing caret behaviour. (#282) Plugins can change their state so that affect on Block's pluginsContent property which is in memory.
* remove useless code
* fix merge
* "MoveDown" tune (#283)
* move down initial Swap current block with next block and scroll window screen
* check if block is last added new method to the blocks API that returns blocks count
* fix comments
* animate tune
* add animation when tune is disabled
* requested changes
* remove unused css
* Fix merge function and rename Block's wrapper (#284)
* Fix merge function and rename wrapper
* update
* renew condition
* update
* upd
* Merging blocks: Restore caret position 🤟🤟💪 (#286)
* Merging blocks: Restore caret position 🤟🤟💪
* requested changes
* update removing shadow caret
* hide toolbar and selection on typing (#289)
* Editor Instance config Interface (#285)
* create interface for editor config
* use IEditorConfig
* create some interfaces
* add comments
* editor interface
* updates
* update editor interface (#293)
* При перемещении по стрелочкам убирать выделение блока (#296)
* При перемещении по стрелочкам убирать выделение блока
* Add comments
* update comments
* update comment
* update toolbar design (#301)
* Set caret at the end if clicked outsite the block (#305)
* Set caret at last block or create new block at end
* update comment
* fix comments
* Insert new Block when enter pressed on editor area (#307)
* insert new block when enter pressed on editor zone
* extra conditions. Enter must be handled on editors area
* move at editor condition to the Selection method
* closes can return null
* fixing editor area
* do not create new block
* clean example
* updates due to the requested changes
* Add placeholder to contentEditable elements (#306)
* add placeholder to contentEditable elements
* store selection color in a variable
* add placeholder to header block
* Add placeholder to contenteditable only if attribute data-placeholder exists
* remove tool config
* Close toolbar after block is removed (#314)
* makeSettings -> renderSettings (#315)
* Term: new icon, new style. + margin between settings buttons (#316)
* remove useless span wrapper
* update linters
* update styles
* process click on svg by closest
* remove commented code
* rename function: svgIcon -> toolboxIcon
* add toolboxIcon to docs
* Paste (#259)
* Paste module
* Rewrite paste logic
* Update due comments
* Docs
* Add all block elements
* Sanitize content on paste
* Remove logs and add header handler
* Add comment to dom.js
* Add comment to tools.js
* Split block if paste not at the end
* Update docs
* Update docs
* Take Tool name from config
* Update docs
* Label onPaste handler as private
* Resolve conflict
* Replace current block if it is empty (#320)
* Improve Header line-height (#321)
* Fix typo (#324)
* CodeX Editor 2.0
* Module Shortcuts (#317)
* import shortcuts
* node modules works
* enable shortcut for inline tools
* check shortcut existance
* enable shortcuts to Block tools
* set caret to block if block replaced
* enable shortcuts on inline-tools
* improve code
* last changes
* update
* fix
* insert returns block so we can set caret
* use Map instead own structure
* disable shortcut if iniline-toolbar disabled
* update code styles
* remove todo
* upd
* update
* remove settings from insert function
* create interface
* code improvements
* use const instead of let
* upd
* Simple Image Tool (#326)
* Simple Image
* fix pattern
* show tunes` state
* update code
* update code
* upd
* Fix toolbox appearance, tools boxed are clickable (#331)
* Remove toolsConfig from Editor's config (#327)
* fix linters
* remove toolsConfig
* update tool's interfaces
* add comments
* bundles
* remove test headers
* restore commented code
* update tool's interface
* toolConfig -> toolSetting
* fix typos
* update code comments
* update installation doc
* update docs
* update dev dep packages (#333)
* Check is paste handler a function only if it exists (#328)
* Toolbar with tab (#330)
* toolbar tabs initial
* leaf initial
* save state
* flip back toolbox items
* enter on toolbox item
* update
* requested changes
* new condfition
* update
* improve animation on leaf
* fix shift+tab flip
* up
* update
* updates
* Consecutive blank lines are forbidden
* Correct choosing next toolbox item
* update
* update comment
* Validate editor's config before initing (#341)
* validate editor's config before initing
* update readme
* @
* update comments
* add function _.isClass
* Styles API (#343)
* StylesAPI
* use styles api in plugins
* add inline styles
* List Tool [new] (#344)
* list tool initial
* list class with settings
* make tool reactive
* final List improvements
* reorder
* tmp update
* unhadrcode enter handler
* updates
* enableLineBreaks also checks
* skip empty items
* select LI by CMD+A, fix backspace in the last item
* improve check for emptiness
* Example page improved (#347)
* Update new example
* imrpove example.html
* updates
* improve code
* Header plugin (#348)
* isFunction function
* use header from cdn
* Improve paste behaviour (#346)
* Improve paste behaviour
* Done
* Don't pass empty items
* Update comment
* move public up
* Remove disallow paste option
* Quote Tool (#329)
* Quote Tool
* Add icon
* Upd
* fix ENTER on quote
* Remove useless code
* items -> blocks (#351)
* use SimpleImage from cdn (#355)
* use simpleimage from cdn
* add comments
* fix spaces
* fix comments
* remove comments
* update simple-image script
* Update text on the example.html (#356)
* use Paragraph Tool from CDN (#357)
* use Paragraph Tool from CDN
* add line brakes
* rename block: paragraph -> text
* Remove _callbacks.js (#358)
* Clear unused files (#359)
* TOOLBAR_ICON_CLASS -> TOOLBAR_ICON (#360)
* TOOLBAR_ICON_CLASS -> TOOLBAR_ICON
* remove defaultConfig
* Delimiter tool (#362)
* Delimiter added
* ашч
* use delimiter from cdn
* Enter on editor (#363)
* Enterpress on editor
* use additional property
* check enter on body
* update
* fix toolbar behaviour
* upd
* update bundle
* remove useless ui property
* update comment
* add Element.prepend() function (#365)
* add Element.prepend() function
* allow to pass element of array to prepend() polyfill
* use List Tool from cdn (#366)
* use List Tool from cdn
* add missing </div> in example.html
* Pass "config" from Tool's settings to Tool's constructor (#367)
* pass config from Tool's settings to Tool's constructor
* reorder elements
* add apiSettings.CONFIG property
* use string as a object's key 😔 (#368)
* update placeholder's styles (#369)
* Add shortcuts for internal tools (#370)
* Add shortcuts for internal tools
* upd doc
* remove articles
* ☹️ guryn asked
* use quote from cdn (#371)
* Add cache to the inline tools (#372)
* use Inline Code Tool from cdn (#375)
* Issue 354 inline tools filter (#376)
* Allow to filter inline tools.
* update example
* update header
* fix endless cycle (#378)
* Destructured options for Inline Tools (#379)
* add destructured options for inline-tools
* temporary disable inlineCode
* remove term sources
* Fix toolbar moving after arrow navigation (#380)
* Fix toolbar moving after arrow navigation
* move before open
* fix error on Enter after block removing
* add example Tools as submodules (#381)
* add destructured options for inline-tools
* temporary disable inlineCode
* remove term sources
* add inline code Tool as a submodule
* update version of inline-code package
* add Tools as submodules
* update Tools and use destructured params object
* Add constructor() docs
* update package Paragraph Tool
* update installation docs
* Input navigation (#339)
* Quote Tool
* Add icon
* Upd
* Initial setup
* Save changes
* Add scroll and fix input focus
* Add comments
* Rebuild bundle
* fix ENTER on quote
* Fix split behaviour
* Fix
* Navigate only to contentful blocks
* add comments
* Fix backspace on last block
* Remove log
* It works
* Resolve comments
* Use constants
* New readme 🦅 (#386)
* New readme 🦅
* upd text
* Issue 374 (#385)
* Fix issue #374
* Set current block index to -1 if there is no blocks left
* Insert new block if first one was removed by default
* Paragraph as a default Tool in editor; Zero-conf (#389)
* git commit -m "Removed submodule Paragraph"
* add paragraph to core + zero-config
* update bundle
* update comment
* remove log
* enable minifying (#390)
* Drop current block index only if there is no selection at the Editor (#388)
* Drop current block index only if there is no selection at the Editor
* Set current node if click ended out of editor
* Small backspace behaviour improvement (#391)
* Small backspace behaviour improvement
* fix caret position
* update from base branch
* Update webpack config
* Migrate to Yarn (#393)
* Migrate to yarn
* Update scripts
* Rewrite helpers classes to TypeScript (#396)
* Add docs and isReady promise (#394)
* set default holderId value (#404)
* Destroyer (#392)
* Initial destroy method
* Add destroy method to api docs
* Export isReady promise in CodexEditor constructor

👨‍🎓

Co-authored-by: Murod Khaydarov <murod.haydarov@gmail.com>
Co-authored-by: George Berezhnoy <gohabereg@gmail.com>
Co-authored-by: Taly <vitalik7tv@yandex.ru>
2018-08-05 14:51:58 +03:00