You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's implement a context menu against each node in rich editor.
Context menu will contain all options related to selected node where user opens the context menu.
For example, when user open context menu on link there will be options to
Copy URL
Open external link (in case it is external link)
Open note (in case it is link into another note)
Download file (in case it is a resource link)
Edit URL
Unlink
For image it will be
Download image
Open full image
Edit (to edit URL and alt text)
Remove
There will also be general actions like
Add link... (for selected text only)
Add image...
Upload file...
Insert current date
Insert page break
Formatting (for selected text and inline nodes)
Bold
Italic
Strike-through
Code
Clear formatting
Block type
Paragraph
Quote
Code block
List type
Unordered list
Ordered list
Task list
Header (with sublist for 6 variants)
Remove (for a block nodes)
Details
Each option can have nested options if necessary, but options list must be designed to run quick and frequent actions instantly with no frictions
Option may show user shortcuts to do the action even quicker, with no context menu opening
We must test options in browser tests. We can mock context menu and check requested menu structure, and optionally call the callbacks like user would do.
Activity