Commit Graph

917 Commits

Author SHA1 Message Date
Abdullah Atta
e41ed07805 Merge pull request #8385 from Scott-will/master
Handle pasting urls in html
2025-08-13 13:27:14 +05:00
Scott-will
f6e8dc0a88 editor: fix pasting html links with titles that look like links
Signed-off-by: Scott Williams scottwill1999@gmail.com

editor: update tests for html handling

Signed-off-by: Scott Williams scottwill1999@gmail.com

editor: add logic for markdown links

Signed-off-by: Scott Williams scottwill1999@gmail.com

editor: remove plugin in favour of markPasteRule

Signed-off-by: Scott Williams scottwill1999@gmail.com
2025-08-13 13:26:01 +05:00
Abdullah Atta
2447b3bea7 Merge pull request #7655 from 01zulfi/global/keyboard
global: keyboard shortcuts documentation && web dialog
2025-07-22 14:21:30 +05:00
01zulfi
52a07da230 editor: remove unneeded code
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-07-22 14:20:15 +05:00
01zulfi
f572bb1637 editor: fix insertParagraph keys
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-07-22 14:20:15 +05:00
01zulfi
0185eea740 editor: remove hardcoded keybind definitions
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-07-22 14:20:01 +05:00
01zulfi
4b2fb80c23 global: add keyboard shortcuts
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>

global: (wip) move keyboard shortcuts metadata into common package
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>

common: refactor keybindings.ts
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>

global: (wip) more refactoring
* minor refactor dialog
* refactor logic out from script file to keybindings file

Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>

common: filter keybindings based on platform && minor ui changes

Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>

editor: use keyboard keys from common package
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>

web: remove unrelated title-box change
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>

editor: add TODO:remove comments
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-07-22 14:19:46 +05:00
Scott-will
b9e24888e7 editor: maintain relative cursor location when list is sorted
Signed-off-by: Scott Williams scottwill1999@gmail.com
2025-07-16 14:01:40 -07:00
01zulfi
94acc241d9 editor: fix internal links opening in new tab in readonly notes
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-07-16 11:47:09 +05:00
01zulfi
00d00c02ea editor: don't clear nodes in clear formatting option (#8260)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-06-27 09:43:36 +05:00
01zulfi
ed50d8041e editor: fix failing snapshot tests (#8215)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-06-17 10:26:15 +05:00
Abdullah Atta
a1f75dfed3 editor: fix search popup removed on link hover 2025-06-16 14:09:45 +05:00
01zulfi
d812024c25 editor: remove styling for sibling elements of double spaced paragraphs (#8144)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-06-16 14:09:27 +05:00
Abdullah Atta
7ab4a2210a editor: make search results style toggleable 2025-06-16 14:08:55 +05:00
Abdullah Atta
5d4d84bded editor: add support for nn-search-result node 2025-06-16 14:08:55 +05:00
01zulfi
2d74e3d4c0 editor: support ctrl/cmd+click to open internal links in new tab (#8131)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-06-16 14:08:55 +05:00
Ammar Ahmed
29433c4149 editor: fix alignment items in callout heading (#8101)
* editor: fix alignment items in callout heading

* Update packages/editor/styles/styles.css

Signed-off-by: Abdullah Atta <thecodrr@protonmail.com>

---------

Signed-off-by: Abdullah Atta <thecodrr@protonmail.com>
Co-authored-by: Abdullah Atta <abdullahatta@streetwriters.co>
2025-06-16 14:08:54 +05:00
Abdullah Atta
c0666d8547 global: fix dependencies version differences 2025-06-16 14:08:24 +05:00
01zulfi
5de5ffe068 editor: improve hover link popup position (#8011)
* move it down so it doesn't block the link

Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-06-16 14:07:44 +05:00
Ammar Ahmed
37dc409b60 mobile: fix cursor bug on ios 2025-04-28 11:36:37 +05:00
Abdullah Atta
6adc5065fb Merge v3.1.0 from streetwriters/beta 2025-04-22 12:06:04 +05:00
01zulfi
528810155f web: fix toc bugs (#7775)
* fix duplicate headings showing in toc view
* fix negative level for some headings

Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-04-21 10:12:53 +05:00
01zulfi
e17351f702 editor: disable spellcheck for links (#7911)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-04-11 09:12:43 +05:00
Abdullah Atta
673ea6da86 editor: remove fixed line height 2025-04-10 10:29:26 +05:00
Ammar Ahmed
24d9568c5d editor: add missing node types in editor 2025-04-10 10:29:26 +05:00
Abdullah Atta
beec9fab22 web: bump version to 3.1.0-beta.0 2025-04-10 10:28:57 +05:00
Abdullah Atta
6bf31bf0ea editor: fix toc level mapping 2025-04-10 10:28:57 +05:00
Abdullah Atta
e186615163 global: update ui 2025-04-10 10:28:57 +05:00
Ammar Ahmed
93c8a1827c editor: increase drop-cursor width 2025-03-28 14:25:59 +05:00
Ammar Ahmed
ca60eda7f2 editor: fix checklist item size 2025-03-28 14:25:59 +05:00
Ammar Ahmed
c22c51791e editor: fix task-list item alignment 2025-03-28 14:25:59 +05:00
01zulfi
d5a719c9f6 editor: font ligatures for common symbols (#7800)
* editor: font ligatures for common symbols
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>

* Update packages/editor/src/extensions/font-ligature/font-ligature.ts

Signed-off-by: Abdullah Atta <thecodrr@protonmail.com>

---------

Signed-off-by: Abdullah Atta <thecodrr@protonmail.com>
Co-authored-by: Abdullah Atta <thecodrr@protonmail.com>
2025-03-28 14:13:02 +05:00
Ammar Ahmed
2078ef9081 editor: do not use look behind regex (#7809) 2025-03-28 12:34:26 +05:00
Abdullah Atta
b56e381022 web: fix editor cursor jumping to start on creating a new note 2025-03-24 12:28:30 +05:00
01zulfi
04519d1db7 editor: fix scroll into view when used by toc (#7764)
* add scroll-margin-top: 35px

Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-03-14 11:55:55 +05:00
Ammar Ahmed
2878f1d9cf editor: ensure consistent gap between heading and first element in callout (#7757) 2025-03-12 13:11:14 +05:00
Ammar Ahmed
a2a4a165a5 editor: fix item margins in editor (#7744) 2025-03-06 15:49:51 +05:00
Ammar Ahmed
9c7ff38f99 editor: fix image padding in readonly mode (#7743)
* editor: fix image padding in readonly mode

* editor: fix class name
2025-03-06 15:46:03 +05:00
Abdullah Atta
a377b13e2b editor: fix single & double spaced paragraph margins 2025-03-01 10:40:27 +05:00
01zulfi
303282624e editor: hide hover popup if right click occurs before popup is shown (#7687)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-03-01 09:23:26 +05:00
01zulfi
2ca02937df editor: open internal links in new tab for middle mouse click (#7688)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-03-01 09:22:47 +05:00
Abdullah Atta
1350784c33 editor: allow other permissions to iframe embeds 2025-02-25 11:00:52 +05:00
Abdullah Atta
1852a216a2 editor: fix Applying mismatched transaction errors on editor load
fixes #7656
2025-02-25 11:00:31 +05:00
Abdullah Atta
8823054227 editor: disable suspiciousAttributes check in prosemirror
this check causes a significant slowdown when loading notes with huge
amount of nodes as it recursively scans the attributes of all the
nodes. Disabling this speeds up loading significantly but might
cause issues in some special cases. Fortunately, this error has never
been triggered by anyone in Notesnook. I wouldn't recommend anyone to
disable this without first testing it properly as it might expose you
to cross site scripting attacks.
2025-02-24 10:36:18 +05:00
Abdullah Atta
7c63a3e004 editor: optimize @tiptap/core
this optimizes the following functions in @tiptap/core:

- `mergeAttributes`
- `getRenderedAttributes`
- `injectExtensionAttributesToParseRule`

These functions stood out the most in the profiler.
2025-02-24 10:33:13 +05:00
Abdullah Atta
2a59154268 editor: improve note loading performance
this commit gets rid of the custom logic when loading a new note in
the same editor. Instead, we just create a new view in the same
editor which seems to be much faster then just replacing the state
of the old view.
2025-02-24 10:31:35 +05:00
Abdullah Atta
ed15d53484 editor: fix block-id extension slowing down pasting
we were using `tr.setNodeMarkup` which created a new step for each
node. If there were a lot of nodes, it'd cause an exponential slow
down. As an alternative, we are directly updating the node's blockId
attribute which is against the spec but it works and it's fast.
2025-02-22 09:42:33 +05:00
01zulfi
a47967dd53 web: add command palette (#7314)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-02-19 15:48:44 +05:00
01zulfi
ac8c63526b editor: add scroll margin & threshold props (#7292)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-02-18 12:27:55 +05:00
01zulfi
a48bd360ca editor: improve hr & p styling (#7489)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-02-17 12:10:10 +05:00