Luis Cateura
ac626c8e1e
Fixed dragged text not being deleted after drop on another editor ( #3279 )
...
* Fixed dragged text not being deleted after drop on another editor
* refactor code solved typescript errors
Co-authored-by: luis.feliu <luis.feliu@mentormate.com>
2022-10-17 12:56:40 +02:00
Alberto Giunta
f6c6b67096
Fix #3032 ( #3245 )
2022-09-29 15:05:27 +02:00
hamflx
2f9ba324a0
fix(core): InputRules does not work for ranges containing multiple text nodes ( #3205 )
...
* fix: InputRules does not work for ranges containing multiple text nodes. #3071
* chore: rename `to` to `sliceEndPos`
2022-09-29 15:05:03 +02:00
Cameron Hessler
17a41da5a7
fix(core): Can() does not work for setting marks ( #3223 )
...
Previously, setting marks did no schema validation checks for dry runs
(like the `.can()` command). The `setMark` raw command will now properly
check if the mark is possible to be set given the editor node/mark
schema.
Co-authored-by: Cameron Hessler <cameron.hessler@buildertrend.com>
2022-09-26 14:56:25 +02:00
Etienne de la Broïse
bda6e8d308
fix(core): insert PasteRule Node at matched position ( #2942 ) ( #2943 )
2022-09-10 14:07:46 +02:00
Rhys-T
4851fc5e9b
fix(core): make setEditable trigger all 'update' listeners ( #3140 )
2022-09-01 13:55:19 +02:00
Dominik
5fed0f2fc6
feature(core): add exit handling for marks ( #2925 )
...
* feat(core): add exit handling for marks
* docs(core): add information about exitable marks
2022-08-22 15:23:44 +02:00
Dominik
de1253a8b0
fix(core): make setEditable trigger onUpdate function ( #2935 )
2022-08-22 14:24:21 +02:00
Asherah Connor
313b8b8d0a
fix(core): setNodeSelection should not clamp pos by Selection.atStart/atEnd ( #3091 )
...
Fixes #3090 .
2022-08-22 14:22:44 +02:00
Asherah Connor
40f4ea31ef
fix(core): createCan command props shouldn't try dispatch ( #3025 ) ( #3026 )
2022-08-22 14:19:44 +02:00
Billiam
18336a8255
Fix paste rule adding one character to paste range ( #2968 )
...
Fixes #2939
2022-08-22 13:26:26 +02:00
Asherah Connor
574cd69e06
fix(core): isNodeSelection, isTextSelection not always false ( #3089 )
...
Fixes #2979 . Since the ProseMirror TypeScript upgrade, these have
always returned false, since the Selection type tree are all classes
now.
2022-08-22 13:05:53 +02:00
ahhshm
f4b9a46a0b
refactor: remove duplicated function ( #2956 )
2022-07-06 20:11:20 +02:00
Dominik
134a4bd1fb
fix(core): dont use selection for setContent replacement ( #2934 )
2022-07-06 12:59:16 +02:00
Sven Adlung
e280a02597
fix(core): only respect text of node before current position ( #2937 ) ( #2941 )
2022-07-06 12:01:23 +02:00
Dominik Biedebach
5b0b7d9102
fix(core): fix focus command passing through editor state instead of existing transaction
...
this fixes a bug introduced a few months ago that caused positions not resolving on the most recent transaction but the editor state that was existing before the last transactions beforehand existed causing the editor to crash
2022-06-26 09:53:45 +02:00
Dominik Biedebach
15123ee092
feat(core): add nodePasteRule to core
2022-06-25 12:07:33 +02:00
Dominik
53e39d0c47
refactor(maintainment): set dependency versions for prosemirror and y… ( #2904 )
...
* refactor(maintainment): set dependency versions for prosemirror and yjs to fixed versions
* refactor(docs): fix dependency versions in demos
* chore: update package-lock.json
* chore: update latest prosemirror packages
2022-06-21 00:17:10 +02:00
Dominik
1ebc8f8e14
chore: migrate to new versions of prosemirror packages ( #2854 )
...
* refactor: upgrade prosemirror packages to new typescript versions
* refactor: migrate to new typings from prosemirror
* style: fix linting issues
* style: fix linting issues
* style: fix linting issues
* fix(ci): fix build process by reimplement filterTransaction
* fix(extension-test): fix broken build because of wrong output file names
* fix: fix prosemirror-tables not being bundled correctly for ES6
* fix: move to prosemirror-tables-contently until es6 build is working
* fix: fix tests for youtube
* fix: fix youtube test
* fix(demos): fix demos build
2022-06-20 11:45:37 +02:00
Dominik
fa8c4ca639
refactor: use index files for imports to simplify the export flow ( #2870 )
2022-06-11 07:11:14 +02:00
Dominik
8c6751f0c6
add precommit hook for linting and automatic eslint fixes + update eslint packages ( #2862 )
...
* chore: add precommit hook for eslint fixes, fix linting issues
* chore: add eslint import sort plugin
2022-06-08 14:10:25 +02:00
Jon Noronha
13a03425b3
lint fixes
2022-05-21 01:05:00 +02:00
Jon Noronha
23483d5e1a
isRequired on attrs
2022-05-21 01:05:00 +02:00
Dominik Biedebach
ecee74a94d
refactor: export new helper from index.ts
2022-05-20 19:04:55 +02:00
Dominik Biedebach
0597e474af
style: move node text content into helper function
2022-05-20 19:04:55 +02:00
Dominik Biedebach
30c39c94c9
style: remove stray console log from input rule
2022-05-20 19:04:55 +02:00
Dominik Biedebach
64b23e120c
fix(core): 🐛 fix inputrule not recognizing text content of non-text leaf nodes
2022-05-20 19:04:55 +02:00
Steven DeMartini
819622c202
Fix typo in text-serializers-from-schema function
2022-05-17 17:38:00 +02:00
Steven DeMartini
155955c9a9
Export helper for text serializers
...
For plugins and other user-defined extensions, it's useful to be able to
be able to use the text-serializers-from-schema helper, like is done in
the built-in clipboardTextSerializer extension
(43611ea2e7/packages/core/src/extensions/clipboardTextSerializer.ts (L21)
).
2022-05-17 17:38:00 +02:00
Ivan Pantic
feef365b53
Expose "range" to textSerializer. Used in "getTextBetween"
2022-05-17 17:36:49 +02:00
JDinABox
0fb68af3a1
Fix extendMarkRange doesn't work when cursor is at end of mark
2022-05-17 13:30:54 +02:00
Felix Klein
ccc37d5f24
add support for CSP nonces in createStyleTag
2022-05-13 14:11:52 +02:00
David Ilizarov
e17c41498a
fix: lint error
2022-05-11 10:22:00 +02:00
David Ilizarov
7401d45b7e
fix: properly calculate setDragImage position
2022-05-11 10:22:00 +02:00
Scott Sidwell
d270419ad8
fix: don't override behaviour of Home / End in pc keymap
...
Similarly removed in Prosemirror at ProseMirror/prosemirror-commands@20371c58
For users who wish to preserve this behaviour, they can achieve this via:
```javascript
const CustomKeyboardBehaviour = Extension.create({
addKeyboardShortcuts() {
return {
['Home']: () => this.editor.commands.selectTextblockStart(),
['End']: () => this.editor.commands.selectTextblockEnd(),
}
}
})
const editor = new Editor({
extensions: [
// Register your custom extension with the editor.
CustomKeyboardBehaviour,
]
});
```
2022-04-08 11:06:37 +10:00
Philipp Kühn
bdab760cdb
fix: revert changes to selectAll command, fix #2491
2022-02-07 10:19:46 +01:00
Philipp Kühn
70422dd107
fix: fix RangeError bug when selecting all text, fix #2490
2022-02-07 09:07:17 +01:00
Philipp Kühn
01411f8462
fix: don’t add tabindex when readonly, fix #2458
2022-02-03 14:54:37 +01:00
Philipp Kühn
d899141a1a
fix lint
2022-01-27 21:37:29 +01:00
Philipp Kühn
4be16fcd2e
fix: set max textselection correctly, fix #2401
2022-01-27 09:44:53 +01:00
Philipp Kühn
b584920ea1
fix: fix End key handler, fix #2446
2022-01-27 09:07:03 +01:00
Philipp Kühn
85fcc29ac6
fix: add attributes to pre tag instead of code tag by default, fix #2440
2022-01-26 09:36:56 +01:00
Philipp Kühn
75e5601767
fix: add correct windows and px keymap
2022-01-25 10:52:36 +01:00
Philipp Kühn
0aa39f93cb
feat: add selectTextblockStart and selectTextblockEnd commands
2022-01-25 10:35:39 +01:00
Philipp Kühn
d2427064ff
fix: insertContent keeps marks when using plain text, fix #2406
2022-01-20 22:15:12 +01:00
Philipp Kühn
9d317128a0
fix: fix removing the caret on blur in some situations when using safari, fix #2405
2022-01-20 21:37:31 +01:00
Philipp Kühn
bc03c0d778
fix: run pasterules for pasted content, fix #2408
2022-01-20 15:04:34 +01:00
Philipp Kühn
42d3ee8fc9
fix: support all characters for suggestion char, fix #2385
2022-01-13 13:57:33 +01:00
Philipp Kühn
6a813686f5
dont return tr in input rules and pasterules
2022-01-10 14:55:53 +01:00
Philipp Kühn
669efd00e9
fix: add way to cancel inputrules and pasterules ( #2368 )
...
Co-authored-by: Philipp Kühn <philippkuehn@MacBook-Pro-von-Philipp.local>
2022-01-10 14:43:56 +01:00