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.17 #1063

Merged
merged 75 commits into from
Mar 14, 2020
Merged
Changes from 1 commit
Commits
Show all changes
75 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
964652d
Resolve Firefox issues (#981)
neSpecc Dec 3, 2019
f262bd7
Set initial hidden Inline Toolbar position (#982)
neSpecc Dec 3, 2019
4a9c65d
[Fix] tooltip types (#986)
gohabereg Dec 7, 2019
22b6f80
Fix to set minHeight 0px (#987)
hata6502 Dec 7, 2019
952c148
[Fix] Selection issues (#988)
gohabereg Dec 7, 2019
3476413
[Dev] Update dependencies (#989)
gohabereg Dec 7, 2019
738019f
Merge branch 'master' into release/2.16
neSpecc Dec 7, 2019
a1917da
Delete codex.tooltips
neSpecc Dec 7, 2019
83fcf82
Update submodules
Dec 7, 2019
aae8ca6
Fix/hide conversion toolbar (#991)
khaydarov Dec 7, 2019
7525427
Update CHANGELOG.md
neSpecc Dec 7, 2019
5679fd1
fix some problems at example
neSpecc Mar 3, 2020
b1c2822
Update CHANGELOG.md
neSpecc Mar 3, 2020
e3a7d88
Fix: bind editor when calling onChange (#1048)
melbahja Mar 3, 2020
c8827b5
updated some wording. (#1044)
drbe4t Mar 3, 2020
84eeefa
Fix grammar in readme.md (#1008)
darrelfrancis Mar 3, 2020
9df986c
Merge branch 'master' into release/2.17
neSpecc Mar 3, 2020
0bb7141
Update editor.js
neSpecc Mar 3, 2020
74c7533
Paste listener on editors instead of document (#1025)
ponnex Mar 3, 2020
bc3e290
Bump acorn from 6.4.0 to 6.4.1 (#1059)
dependabot[bot] Mar 14, 2020
3a83a1d
Fix flipper activate/deactivate when conversionToolbarOpened (#1001)
aablinov Mar 14, 2020
e10da45
[Issue-1057]: open new window by clicking anchor with ctrl (#1062)
khaydarov Mar 14, 2020
92eab3b
Fix settings box-sizing (#1013)
hata6502 Mar 14, 2020
06d657c
Improvements: new Block Settings button style (#1064)
neSpecc Mar 14, 2020
3877380
[Feature] In-house copy paste (#1060)
gohabereg Mar 14, 2020
8b838bf
New block lifecycle hook and BlockToolAPI: "moved" (#1007)
natterstefan Mar 14, 2020
a5513a3
Change paste function of text/plain (#1014)
hata6502 Mar 14, 2020
c1860c9
Improve paste function of multiple lines (#1016)
hata6502 Mar 14, 2020
b7e4f91
2.17.0
gohabereg Mar 14, 2020
834930d
Update bundle
gohabereg Mar 14, 2020
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
Improve paste function of multiple lines (#1016)
Co-authored-by: Georgy Berezhnoy <[email protected]>
hata6502 and gohabereg authored Mar 14, 2020
commit c1860c94c9cb44fda69721c514b99f8d55f3e03b
2 changes: 1 addition & 1 deletion dist/editor.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@
- `New` Block [lifecycle hook](tools.md#block-lifecycle-hooks) `moved`
- `Deprecated`[`blocks.swap(fromIndex, toIndex)`](api.md) method is deprecated. Use `blocks.move(toIndex, fromIndex)` instead.
- `Fix` — Improve plain text paste [#1012](https://github.com/codex-team/editor.js/issues/1012)
- `Fix` — Fix multiline paste [#1015](https://github.com/codex-team/editor.js/issues/1015)

### 2.16.1

10 changes: 5 additions & 5 deletions src/components/modules/paste.ts
Original file line number Diff line number Diff line change
@@ -641,7 +641,11 @@ export default class Paste extends Module {
if (BlockManager.currentBlock && BlockManager.currentBlock.currentInput) {
const currentToolSanitizeConfig = Sanitizer.getInlineToolsConfig(BlockManager.currentBlock.name);

document.execCommand('insertHTML', false, Sanitizer.clean(content.innerHTML, currentToolSanitizeConfig));
document.execCommand(
'insertHTML',
false,
Sanitizer.clean(content.innerHTML, currentToolSanitizeConfig),
);
} else {
this.insertBlock(dataToInsert);
}
@@ -765,10 +769,6 @@ export default class Paste extends Module {
case Node.ELEMENT_NODE:
const element = node as HTMLElement;

if (element.tagName === 'BR') {
return [...nodes, destNode, new DocumentFragment()];
}

const {tool = ''} = this.toolsTags[element.tagName] || {};
const toolTags = this.tagsByTool[tool] || [];

6 changes: 6 additions & 0 deletions src/components/modules/sanitizer.ts
Original file line number Diff line number Diff line change
@@ -204,6 +204,12 @@ export default class Sanitizer extends Module {
});
}

/**
* Allow linebreaks
*/
config['br'] = true;
config['wbr'] = true;

return config;
}