Skip to content

KB article on how to get the selected content from the editor #172

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 24, 2020

Conversation

svdimitr
Copy link
Contributor

No description provided.

@svdimitr svdimitr self-assigned this Nov 18, 2020
@svdimitr svdimitr changed the title feat(kb): how to get the selected content from the editor KB article on how to get the selected content from the editor Nov 18, 2020
@svdimitr svdimitr marked this pull request as ready for review November 19, 2020 15:15

## Notes

The browser selection exists only in the browser. Sending it to the Blazor app will remove all its functionality and its context. For example, you no longer have access to its start and end, you cannot alter them, and it will be up to your C# code to determine where exactly that selection is in the content and how to modify the entire content to both produce the desired results, and remain valid HTML. With this in mind, consider applying changes directly with JavaScript to the selection object.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sync with dev whether it is possible to get the ProseMirror instance from the editor in JS so they can invoke commands from it. This will make altering the selection considerably easier, doing this manually is extremely difficult.

@svdimitr svdimitr merged commit 81dd341 into master Nov 24, 2020
@svdimitr svdimitr deleted the kb-select-editor-content branch November 24, 2020 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants