Support for inline uneditable/dynamic nodes
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- frontend
Research direction
Start by reviewing the model and SelectionRange behavior described in the issue, then trace how inline content affects offsets during deletion. The issue names no files or tests, so first clarify the desired native API and synchronization semantics for uneditable dynamic nodes; done should include agreed behavior and coverage for deletion after an inline node.
Written by the indexing model from the issue text.
Description
First off, thanks for creating Svedit, it's a really great library! I appreciate how flexible it is and the thoughtful design decisions that went into it. I've been following it for a while, it's really cool work!
I was wondering if inlining uneditable/dynamic nodes was something on your roadmap. I'm thinking of cases like @user-mentions (where usernames may change) or references to other resources that may change over time and would be inlined in a paragraph – essentially content that shouldn't be hardcoded in the document because it needs to stay in sync with external data.
I tried different approaches and managed to get pretty far with a very basic implementation, but I'm clearly going against the grain, especially because I'm trying not to change the core Svedit files so that I can easily update them as you drop new features.
The main issue is that since the content I'm inserting is dynamic, I'm inlining the node but not inserting the content in the model. This pretty much works but breaks when deleting content that follows that node, since the offsets calculated from the SelectionRange will be out of sync with the character length.
Have you already thought about this use case? Do you have any suggestions for how to approach this, or is this something you'd consider adding native support for? I'm happy to share more details about my current implementation if that would be helpful!
- Dominant language
- TypeScript
- Stars
- 691
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from michael/svedit
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Similar issues
-
bug data-types
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/clickhouse-js#1293 ·
Maintainers usually reply within 1 day
-
area: middleware enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
agent/quality testing
Difficulty 1/5 Under an hour Newbie friendliness 95/100
Maintainers usually reply within 1 day
-
GitHub registry install via `gh` credentials rewrites `\u0000`–`\u001f` escapes in source files to `^@`–`^_`Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
juspay/agent-distro#203 ·
Maintainers usually reply within 1 day