Commit Graph

861 Commits

Author SHA1 Message Date
Abdullah Atta
ffafd2e787 editor: fix marks lost on node split 2026-03-05 12:26:59 +05:00
Abdullah Atta
8500c971eb editor: fix font family not reflected in toolbar 2026-03-05 12:26:59 +05:00
Copilot
d5bf8a6e3c editor: fix backticks create inline code even with Markdown Shortcuts disabled (#9415) 2026-03-02 10:29:21 +05:00
Copilot
26a9086d96 editor: fix TOC active heading detection (#9413)
* Initial plan

* fix: compute heading offsets relative to editor root for correct TOC highlighting

Headings inside callout blocks had incorrect `offsetTop` values because
`offsetTop` is relative to the nearest positioned ancestor (the callout),
not the editor root. This caused the TOC to highlight wrong sections.

Fix: walk the `offsetParent` chain from the heading up to the editor
content element, accumulating `offsetTop` values to get the correct
absolute position within the editor.

Co-authored-by: thecodrr <7473959+thecodrr@users.noreply.github.com>

* editor: ignore callouts from toc

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: thecodrr <7473959+thecodrr@users.noreply.github.com>
Co-authored-by: Abdullah Atta <abdullahatta@streetwriters.co>
2026-03-02 09:34:53 +05:00
Ammar Ahmed
f778d83316 editor: prevent audio element request attachment data multiple times 2026-02-26 10:53:32 +05:00
Abdullah Atta
d635c1a056 Merge pull request #9364 from streetwriters/editor/audio-playback
editor: support audio attachment playback
2026-02-24 11:06:50 +05:00
Abdullah Atta
8c74324ff8 editor: handle attachments based on mime type 2026-02-24 10:29:58 +05:00
01zulfi
f2230eb39b editor: disallow inserting empty embed urls/code (#9392)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2026-02-24 09:50:38 +05:00
Abdullah Atta
ab900ae5da editor: various fixes and improvements related to audio widget 2026-02-24 09:36:47 +05:00
Abdullah Atta
5d922d934c Merge branch 'master' into beta 2026-02-21 10:36:37 +05:00
Abdullah Atta
656f87e3c6 editor: fix crash if embed url is invalid or empty 2026-02-21 10:30:18 +05:00
01zulfi
add1b8a68a editor: support audio attachment playback
Co-authored-by: Hamish <133548095+Hamster45105@users.noreply.github.com>
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2026-02-18 11:24:45 +05:00
01zulfi
50136e3689 editor: use last set code language as default (#7086)
Co-authored-by: Abdullah Atta <abdullahatta@streetwriters.co>
2026-02-12 13:49:52 +05:00
01zulfi
e87f5e5f89 editor: escape html in twitter embed src (#9326)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2026-02-10 12:33:56 +05:00
01zulfi
994060cce2 editor: allow attaching image as file (#8752)
* editor: allow attaching image as file
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>

* web: fix image previews for regular attachments

* mobile: allow images to be added as attachment without preview

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

---------

Co-authored-by: Ammar Ahmed <ammarahmed6506@gmail.com>
2026-02-02 10:26:03 +05:00
Abdullah Atta
1d8a958eaf editor: update test snapshots 2026-01-26 13:07:35 +05:00
01zulfi
60df472d53 editor: fix search scroll not working on switching editors or opening new editor (#8061)
* editor: fix search scroll not working on switching editors or opening new editor
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>

* editor: initialize search right after editor is created
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2026-01-19 11:59:48 +05:00
01zulfi
076cea6d6d editor: add scrollbar to color picker (#8065)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2026-01-16 19:22:08 +05:00
01zulfi
bfedc1f43e editor: replace simplebar with simple css styling (#9085)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2026-01-16 14:24:11 +05:00
Abdullah Atta
1025c4ec6e editor: minor refactors 2026-01-16 11:17:49 +05:00
Abdullah Atta
c44f9f685d editor: parse csv directly to prosemirror nodes 2026-01-16 11:17:33 +05:00
Ammar Ahmed
ee139463d2 mobile: export table to csv 2026-01-16 10:58:17 +05:00
01zulfi
2cf7f0cc27 editor: add options to export/import table <> csv
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2026-01-16 10:58:17 +05:00
01zulfi
09cba1a1df editor: fix youtube embeds erroring with code 153 (#9180)
* web: add referer header with content origin
* youtube embeds aren't working without adding this header

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

* editor: use corsHost for youtube embeds

* editor: make youtube embed detection more robust

* web: remove referrer meta tag

---------

Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
Co-authored-by: Ammar Ahmed <ammarahmed6506@gmail.com>
Co-authored-by: Abdullah Atta <abdullahatta@streetwriters.co>
2026-01-15 19:22:46 +05:00
01zulfi
966673dfd1 editor: add clear current node keyboard shortcut (#7272)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2026-01-15 10:38:33 +05:00
Abdullah Atta
7e87cf7fdc Merge pull request #9170 from streetwriters/editor/fix-line-height-css-issues
editor: fix icons not aligning in outline,task,check lists & callouts because of custom line height
2026-01-14 13:52:36 +05:00
01zulfi
22a6271423 editor: fix duplicate block-id on splitting node (#9198)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2026-01-14 10:56:31 +05:00
01zulfi
e0c31d6fdd editor: fix icons not aligning in outline,task,check lists & callouts because of custom line height
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2026-01-07 14:05:57 +05:00
Abdullah Atta
fa0a5afa63 Merge pull request #9113 from streetwriters/editor/collapsible-headings-perf
editor: improve collapsible heading performance
2026-01-02 09:43:06 +05:00
01zulfi
b881b236a0 editor: export & use AttributeUpdate interface
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2026-01-01 15:23:27 +05:00
01zulfi
50666c1307 editor: add a collapsible heading test case
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-12-31 15:33:21 +05:00
01zulfi
200c9bd9eb editor: improve checks to not unecessary call toggle fn in heading update plugin
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-12-31 15:01:14 +05:00
01zulfi
5c21c0a498 global: support day format options & $day$ title format & /day command
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-12-31 14:54:44 +05:00
01zulfi
7a12fd701e editor: batch update hidden attribute when toggling headings
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-12-30 16:53:02 +05:00
01zulfi
8298900f76 editor: support ctrl+c for images (#8386)
* editor: support ctrl+c for images
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>

* editor: add test for copy image functionality
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-12-30 13:46:24 +05:00
01zulfi
255677d98e editor: improve headingUpdatePlugin performance
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-12-29 14:23:16 +05:00
01zulfi
41094c80d5 editor: add move line up/down keybinding (#7078)
* editor: add move line up/down keybinding
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>

* docs: update keyboard shortcuts

* editor: add missing changes

* editor: add move parent node up/down keyboard shortcut
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>

* editor: refactor moveNode fn && add a test case
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>

* editor: improve move node logic
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>

---------

Co-authored-by: Abdullah Atta <abdullahatta@streetwriters.co>
2025-12-23 12:39:30 +05:00
01zulfi
f6140e8396 editor: fix crash on task list toggle & drag (#9078)
* make sure column resizing's handleMouseDown correctly checks for handle element

Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-12-23 10:55:28 +05:00
01zulfi
5171b2e5e2 editor: fix scroll for tables in mobile
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-12-18 10:20:10 +05:00
Abdullah Atta
b5a706a6a9 editor: fix TouchEvent is not defined when resizing columns 2025-12-17 14:40:25 +05:00
01zulfi
a4d29f3e7a editor: hide expand/collapse icon for empty headings (#9063)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-12-17 14:18:30 +05:00
Abdullah Atta
dfc4cbe01f Merge pull request #9042 from streetwriters/editor/fix-callout-heading
editor: fix callout collapse/expand on clicking right after its heading
2025-12-12 09:57:56 +05:00
01zulfi
2cdfe2c158 editor: add shortcut to open search and replace (#9043)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-12-11 11:28:15 +05:00
01zulfi
d1dfafe1da editor: fix callout collapse/expand on clicking right after its heading
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-12-10 14:36:50 +05:00
01zulfi
121e521eb7 editor: hide horizontal rule if its under a collapsed heading (#9038)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-12-10 10:01:14 +05:00
Abdullah Atta
db4d998705 editor: fix TouchEvent is not defined 2025-12-03 13:59:36 +05:00
01zulfi
aa572febd4 editor: add toggle text color keybinding (#9010)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-11-29 12:36:09 +05:00
01zulfi
52a3d1c373 editor: readonly table fixes (#8997)
* editor: readonly table fixes
* fix tables not hiding under collapsed headings in readonly view
* allow column resizing in readonly view
* fix scrollbar not showing in readonly view

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

* editor: remove table view

---------

Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
Co-authored-by: Abdullah Atta <abdullahatta@streetwriters.co>
2025-11-27 12:04:23 +05:00
01zulfi
573b24f28f editor: fix heading align (#8996)
this reverts all the custom layout based on divs & spans and moves back to using pseudo element for the expand/collapse icon.

There were a few problems with the previous logic:

1. We had to write custom logic for text alignment (not a huge deal but it could cause bugs down the line)
2. Aligning the icon properly was hit or miss. We were using flex which meant for multi line headings, the icon appeared way to the left instead of right next to the end of the heading.
3. The styling css for the previous logic was MASSIVE and handled lots of cases which meant more maintenance burden for us.

The new logic is simpler:

1. Use `::after` pseudo element for the expand/collapse icon. This works very nicely on Android.
2. Use selection range on the heading to compute bounding rects for each line. It's a bit hacky but works for both LTR & RTL headings.

---------

Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
Co-authored-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
Co-authored-by: Abdullah Atta <abdullahatta@streetwriters.co>
2025-11-27 11:43:27 +05:00
01zulfi
6473ce4244 editor: unhide children when collapsed heading is changed to non-heading node (#8946)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-11-27 11:43:27 +05:00