Commit Graph

644 Commits

Author SHA1 Message Date
Philipp Kühn
a96a57dd81 code style 2021-12-03 10:40:56 +01:00
philippkuehn
b4ab7f079b ci: fix code style linting errors 2021-12-03 09:36:51 +00:00
BrianHung
de39853026
fix: initialize autofocus selection in createView (#2212)
* initialize autofocus selection in `createView`

* fix missing variable and null error

* remove unused imports
2021-12-03 10:35:17 +01:00
Philipp Kühn
3d68981b47
feat: Add support for autolink (#2226)
* wip

* WIP

* add autolink implementation

* refactoring

* set keepOnSplit to false

* refactoring

* improve changed ranges detection

* move some helpers into core

Co-authored-by: Philipp Kühn <philippkuehn@MacBook-Pro-von-Philipp.local>
2021-12-03 08:53:58 +01:00
Philipp Kühn
40a9404c94 add newline-after-var rule to eslint config 2021-12-03 00:03:39 +01:00
Philipp Kühn
20b6d79f33 fix: remove defaultOptions fallback, fix #2219 2021-12-02 20:04:45 +01:00
Philipp Kühn
fa18ffe6d7 update eslint config 2021-12-01 15:40:50 +01:00
Philipp Kühn
e0f64904b6 feat: add scrollIntoView option to focus command, fix #2172 2021-11-25 17:18:30 +01:00
Philipp Kühn
403c147d4d feat: add defaultBlockAt helper 2021-11-23 14:32:54 +01:00
Philipp Kühn
3c571c9a3f feat: add 'all' option to focus command, fix #2181 2021-11-22 10:17:06 +01:00
Philipp Kühn
cd14731612 fix: improve default gapcursor position when surrounded by margins 2021-11-18 14:02:53 +01:00
Philipp Kühn
7ea55279a3 refactoring 2021-11-18 12:46:21 +01:00
aguingand
3158c37324
feat: Allow array of extensions for enableInputRules and enablePasteRules options (#2119) 2021-11-18 12:44:34 +01:00
Philipp Kühn
7e1ca4c8bd refactoring 2021-11-18 12:38:02 +01:00
Jon Noronha
10fea3b44e
fix: Ignore iOS mutations when unfocused (#2170) 2021-11-18 12:37:21 +01:00
Philipp Kühn
53ffce5018 fix: prevent removing inline nodes when using insertContentAt, fix #2156 2021-11-10 21:16:02 +01:00
Jason Galea
6583edeb1f
fix: update getJSON return type to JSONContent (#2153) 2021-11-10 00:24:18 +01:00
Philipp Kühn
a0a88acd13 fix: don't remove the tiptap styles on destroy, fix #2120, fix #2143 2021-11-09 17:16:38 +01:00
Philipp Kühn
5da313a548 fix: fix a bug when parsing attributes if no parseHTML method is provided, fix #2058 2021-11-08 21:27:46 +01:00
Philipp Kühn
8fc915cade
fix: Improve behavior when using insertContent (#2147)
* check if we can replace the wrapping node by the newly inserted content
    /

* we dont need this anymore

* set selection to inserted content instead of below

* improve hr cursor behavior
2021-11-08 20:37:12 +01:00
Philipp Kühn
ce7f52a8f0 fix: improve JSONContent type to allow pure JSON content 2021-11-03 21:11:24 +01:00
Philipp Kühn
010418d0fd fix: prevent RangeError for posToDOMRect, fix #2112 2021-10-31 12:03:24 +01:00
Philipp Kühn
9afadeb7fe
feat!: Replace defaultOptions with addOptions (#2088)
* add new addOptions option

* replace defaultOptions with addOptions for all extensions

* replace defaultOptions with addOptions for all demos

* replace defaultOptions with addOptions in docs

* refactoring

* refactoring

* drop object support for addOptions

* fix optional options

* fix tests
2021-10-26 18:31:13 +02:00
Philipp Kühn
ef254cead7 fix: fix storage context when using configure 2021-10-25 00:27:24 +02:00
Jon Noronha
bebaa4045e
fix: Separate drags from drops in stopEvent (#2070)
* Separate drags from drops in stopEvent

* Move !isDropEvent
2021-10-22 21:27:58 +02:00
Philipp Kühn
0e94afe42a fix: improve default styling for .ProseMirror-separator 2021-10-22 15:05:18 +02:00
Philipp Kühn
ff67ee1da3 fix: fix a bug where paste rules doesn’t worked at the start of the document, see #1225 2021-10-22 09:04:09 +02:00
Philipp Kühn
7ffabf251c
feat: Add extension storage (#2069) 2021-10-22 08:52:54 +02:00
Philipp Kühn
22c82ba61f fix: check for storedMarks in getMarkAttributes, fix #2039 2021-10-14 20:45:44 +02:00
Philipp Kühn
4295c6bd21 fix: fix type for insertContent command 2021-10-14 12:30:16 +02:00
Philipp Kühn
9f2c36896b feat: add updateSelection option to insertContentAt command 2021-10-14 12:08:39 +02:00
Philipp Kühn
4303637a78
feat: Allow to use commands within InputRule and PasteRule (#2035)
* add optional state prop to commandmanager

* add commands, chain and can getter to commandmanager

* use custom CommandManager for input rules and paste rules

* export commandmanager
2021-10-14 11:56:40 +02:00
Philipp Kühn
3958bf1c22 fix: allow to re-apply current mark for input rules and paste rules, fix #2003 2021-10-10 22:23:32 +02:00
Philipp Kühn
9d281e9e99 fix: do not apply paste rules for ProseMirror HTML 2021-10-10 19:25:50 +02:00
Philipp Kühn
770c4e18e1 fix: fix mappes positions for paste rules, fix #2002 2021-10-08 22:40:06 +02:00
Philipp Kühn
723b955cec
feat: Integrate input rules and paste rules into the core (#1997)
* refactoring

* improve link regex

* WIP: add new markPasteRule und linkify to image mark

* move copy of inputrule to core

* trigger codeblock inputrule on enter

* refactoring

* add regex match to markpasterulematch

* refactoring

* improve link regex

* WIP: add new markPasteRule und linkify to image mark

* move copy of inputrule to core

* trigger codeblock inputrule on enter

* refactoring

* add regex match to markpasterulematch

* update linkify

* wip

* wip

* log

* wip

* remove debug code

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* rename matcher

* add data to ExtendedRegExpMatchArray

* remove logging

* add code option to marks, prevent inputrules in code mark

* remove link regex

* fix codeblock inputrule on enter

* refactoring

* refactoring

* refactoring

* refactoring

* fix position bug

* add test

* export InputRule and PasteRule

* clean up link demo

* fix types
2021-10-08 15:02:09 +02:00
Philipp Kühn
f8efdf797a fix: fix order of executed plugins, fix #1547 2021-10-03 18:55:33 +02:00
Philipp Kühn
e61521c858 refactoring 2021-09-30 09:38:57 +02:00
Philipp Kühn
8db5a943d2 refactoring 2021-09-30 09:34:45 +02:00
HuiiBuh
54e85fd284
feat: #1898 Made the EventEmitter generic to improve the types of the tiptap events (#1959) 2021-09-30 09:25:40 +02:00
Philipp Kühn
2c9cf03398 fix: getHTMLFromFragment now expects a fragment instead of node 2021-09-28 21:34:57 +02:00
Philipp Kühn
b42e442a5a fix: add support for CellSelection in isActive helper, fix #1947 2021-09-27 23:33:32 +02:00
Philipp Kühn
32ae3868ea fix: handle backspace also on shift 2021-09-27 23:03:51 +02:00
Philipp Kühn
aa25d362f9 refactoring 2021-09-27 23:03:23 +02:00
Philipp Kühn
e5c765c8e4 refactoring 2021-09-22 22:45:27 +02:00
Philipp Kühn
c91b2f29be refactoring 2021-09-22 21:14:07 +02:00
Philipp Kühn
fcca1e6f4d fix: improve performance for isActive method, see #1930 2021-09-22 19:43:55 +02:00
philippkuehn
39e1be59bb ci: fix code style linting errors 2021-09-22 11:00:24 +00:00
Nokola
8ee0d67b83
fix: nodeInputRule() support for group match (#1574)
* Fix: nodeInputRule() support for group match

Fixes in nodeInputRule()
- add support for "first group match, if any" similar to https://prosemirror.net/docs/ref/#inputrules
- fix issue where rewriting includes extra unnecessary character from the match

* Insert last typed in nodeInputRule group match
2021-09-22 12:59:25 +02:00
Philipp Kühn
bad16d9f3a fix: call selectAll on 'cmd+a', set a TextSelection instead of AllSelection, fix #1908 2021-09-22 00:03:32 +02:00