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

issue-705: Leaf BlockSettings and InlineTools via keyboard #723

Merged
merged 51 commits into from
May 24, 2019
Merged
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
84689b5
Do not start multi-block selection on UI elements (#662)
gohabereg Apr 4, 2019
d2cb37f
Add link to issue
gohabereg Apr 5, 2019
7d1ce59
Merge branch 'release/2.12' of https://github.com/codex-team/codex.ed…
Apr 5, 2019
a750894
Fix loss of pointer (#666)
gohabereg Apr 5, 2019
4073724
Update shortcuts module (#685)
khaydarov Apr 6, 2019
a146c2e
Remove margin top for inline-link icon (#690)
talyguryn Apr 6, 2019
f0d9548
Pull fresh tools
talyguryn Apr 6, 2019
d5bc6fa
Remove changelog contents from readme (#700)
kabachook Apr 8, 2019
57b5a09
Merge branch 'master' of https://github.com/codex-team/codex.editor i…
gohabereg Apr 10, 2019
f554945
#665 API to open and close inline-toolbar (#711)
tanmayv Apr 11, 2019
53df2d5
leaf buttons: initial
khaydarov Apr 12, 2019
ee9321a
leaf inline toolbar buttons
khaydarov Apr 12, 2019
5f71c6f
Allow holderId work with ref on dom element (#710)
dimensi Apr 15, 2019
00622cd
leaf inline tools and drop index after click
khaydarov Apr 26, 2019
b2d0acc
leaf toolbox and clear active button after activation
khaydarov Apr 26, 2019
72c0987
debugging blockSettings
khaydarov Apr 26, 2019
5f0d242
Activating Open Collective (#736)
monkeywithacupcake Apr 27, 2019
800657e
Do not install editor.js as dev-dependency (#731)
davidsneighbour Apr 27, 2019
2de4318
Move codex-notifier to dependencies for typescript declarations (#728)
gohabereg Apr 27, 2019
27cbaa5
Close inline toolbar after creating new link by pressing ENTER (#722)
tanmayv Apr 27, 2019
ca58f74
Link Logo Image to homepage (#738)
goldensunliu Apr 27, 2019
3befe95
Update README.md (#744)
neSpecc Apr 27, 2019
f518a67
Config minHeight option that allows to customize bottom zone (#745)
neSpecc Apr 28, 2019
1cd6149
issue-739: allow Block's editable element selection (#747)
khaydarov Apr 28, 2019
0ab6a29
Fix typo in example paragraph (#749)
stephan281094 Apr 29, 2019
4816fb4
minor release
neSpecc Apr 29, 2019
f25c497
Merge branch 'release/2.13' into issue-705-block-actions-from-keyboard
khaydarov May 19, 2019
b730ed8
done
khaydarov May 19, 2019
e99b21c
requested changes
khaydarov May 20, 2019
1ca9b64
production build
khaydarov May 20, 2019
c5f1ba3
Merge branch 'release/2.14' into issue-705-block-actions-from-keyboard
khaydarov May 20, 2019
ffcf176
update package.json
khaydarov May 20, 2019
9ebc7a4
some improvements
khaydarov May 20, 2019
9d2a009
ready for testing
khaydarov May 20, 2019
e37b3bf
Merge branch 'release/2.14' into issue-705-block-actions-from-keyboard
khaydarov May 22, 2019
0f68cfd
update
khaydarov May 22, 2019
2bac1a6
ready
khaydarov May 22, 2019
3d3e7f6
requested changes
khaydarov May 23, 2019
14a3b30
updates
khaydarov May 23, 2019
7ac2e42
use setToBlock instead of focus
khaydarov May 23, 2019
1b176a5
active -> focused
khaydarov May 23, 2019
5a734b3
update
khaydarov May 23, 2019
eb32095
refactor types
khaydarov May 23, 2019
460bf4b
fix inline tools flipping
khaydarov May 23, 2019
202f5eb
inhancements
khaydarov May 24, 2019
369ce68
rm check for focus at the handleShowingEvent
neSpecc May 24, 2019
f4dd0c9
fix IT closing after second enter
neSpecc May 24, 2019
092281e
add animation to settings buttons
khaydarov May 24, 2019
a7d5123
Click animation
neSpecc May 24, 2019
e64e948
Add changelog
neSpecc May 24, 2019
031d687
do not patch version
neSpecc May 24, 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
Prev Previous commit
Next Next commit
#665 API to open and close inline-toolbar (#711)
* API to open and close inline-toolbar

* Fixed documentation

* renamed inline -> inline-toolbar

* removed dist

* reset editor.js

* added editor.js bundle

* Fixed build error

* Null checks on toolbar/inline@open

* updated bundle

* Improve some comments

* Updatd api.md CHANGELOG.md

* Change feature to new instead of improvement
tanmayv authored and neSpecc committed Apr 11, 2019

Verified

This commit was signed with the committer’s verified signature. The key has expired.
aitbw Angel Perez
commit f5549458ae55443108ff63c10c8eb0577e7bbc9f
16 changes: 8 additions & 8 deletions dist/editor.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

### 2.13

- `New` *API* — Added [API methods](api.md) to open and close inline toolbar [#665](https://github.com/codex-team/editor.js/issues/665)

### 2.12.4

- `Improvements` CodeX.Shortcuts version updated to the v1.1 [#684](https://github.com/codex-team/editor.js/issues/684)
8 changes: 8 additions & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
@@ -69,6 +69,14 @@ Methods that working with Toolbar

`close()` - closes toolbar, toolbox and blockSettings if they are opened

### InlineToolbarAPI

Methods that works with inline toolbar

`open()` - opens inline toolbar, (opens for the current selection)

`close()` - closes inline toolbar

### ListenerAPI

Methods that allows to work with DOM listener. Useful when you forgot to remove listener. Module collects all listeners and destroys automatically
1 change: 1 addition & 0 deletions src/components/modules/api/index.ts
Original file line number Diff line number Diff line change
@@ -24,6 +24,7 @@ export default class API extends Module {
selection: this.Editor.SelectionAPI.methods,
styles: this.Editor.StylesAPI.classes,
toolbar: this.Editor.ToolbarAPI.methods,
inlineToolbar: this.Editor.InlineToolbarAPI.methods,
} as APIInterfaces;
}
}
33 changes: 33 additions & 0 deletions src/components/modules/api/inlineToolbar.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import Module from '../../__module';
import { InlineToolbar } from '../../../../types/api/inline-toolbar';

/**
* @class InlineToolbarAPI
* Provides methods for working with the Inline Toolbar
*/
export default class InlineToolbarAPI extends Module {
/**
* Available methods
* @return {InlineToolbar}
*/
get methods(): InlineToolbar {
return {
close: () => this.close(),
open: () => this.open(),
};
}

/**
* Open Inline Toolbar
*/
public open(): void {
this.Editor.InlineToolbar.open();
}

/**
* Close Inline Toolbar
*/
public close(): void {
this.Editor.InlineToolbar.close();
}
}
2 changes: 1 addition & 1 deletion src/components/modules/api/toolbar.ts
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ import {Toolbar} from '../../../../types/api';

/**
* @class ToolbarAPI
* provides with methods working with Toolbar
* Provides methods for working with the Toolbar
*/
export default class ToolbarAPI extends Module {
/**
9 changes: 8 additions & 1 deletion src/components/modules/toolbar/inline.ts
Original file line number Diff line number Diff line change
@@ -170,7 +170,14 @@ export default class InlineToolbar extends Module {
/**
* Shows Inline Toolbar
*/
private open(): void {
public open(): void {
/**
* Check if inline toolbar is allowed to show or not
*/
if (!this.allowedToShow()) {
return;
}

/**
* Filter inline-tools and show only allowed by Block's Tool
*/
2 changes: 2 additions & 0 deletions src/types-internal/editor-modules.d.ts
Original file line number Diff line number Diff line change
@@ -30,6 +30,7 @@ import SaverAPI from '../components/modules/api/saver';
import Saver from '../components/modules/saver';
import BlockSelection from '../components/modules/blockSelection';
import RectangleSelection from '../components/modules/RectangleSelection';
import InlineToolbarAPI from '../components/modules/api/inlineToolbar';

export interface EditorModules {
UI: UI;
@@ -63,5 +64,6 @@ export interface EditorModules {
SelectionAPI: SelectionAPI;
StylesAPI: StylesAPI;
ToolbarAPI: ToolbarAPI;
InlineToolbarAPI: InlineToolbarAPI;
NotifierAPI: NotifierAPI;
}
1 change: 1 addition & 0 deletions types/api/index.d.ts
Original file line number Diff line number Diff line change
@@ -8,3 +8,4 @@ export * from './styles';
export * from './caret';
export * from './toolbar';
export * from './notifier';
export * from './inline-toolbar'
15 changes: 15 additions & 0 deletions types/api/inline-toolbar.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
* Describes InlineToolbar API methods
*/
export interface InlineToolbar {
/**
* Closes InlineToolbar
*/
close(): void;

/**
* Opens InlineToolbar
*/
open(): void;
}

5 changes: 3 additions & 2 deletions types/index.d.ts
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
*/

import {EditorConfig} from './configs';
import {Blocks, Caret, Events, Listeners, Notifier, Sanitizer, Saver, Selection, Styles, Toolbar} from './api';
import {Blocks, Caret, Events, Listeners, Notifier, Sanitizer, Saver, Selection, Styles, Toolbar, InlineToolbar} from './api';

/**
* Interfaces used for development
@@ -51,6 +51,7 @@ export interface API {
selection: Selection;
styles: Styles;
toolbar: Toolbar;
inlineToolbar: InlineToolbar;
}

/**
@@ -70,7 +71,7 @@ declare class EditorJS {
public selection: Selection;
public styles: Styles;
public toolbar: Toolbar;

public inlineToolbar: InlineToolbar;
constructor(configuration?: EditorConfig|string);

public destroy(): void;