ankitects / ankitects/anki

Convert divs when cloze deleting?

Open
#1,051 4 comments 0 reactions 0 assignees View on GitHub
editor
Dominant language
Rust
Stars
30.5k
Forks
3.2k
Avg merge
2d 8h
Merged PRs (30d)
60

Description

The issue mentioned on https://github.com/ijgnd/anki__editor__apply__font_color__background_color__custom_class__custom_style/issues/45 also affects cloze deletions made across multiple divs - they end up having extra lines inserted, and don't display properly during review, as the subsequent text manipulation creates invalid HTML.

While the new editor code should use `
`s when typing in, a lot of users paste in content from other sources. I wonder if we could make the cloze deletion action handle this? If it detected a selection across multiple nodes, maybe it could automatically convert the nodes covered by the selection into linebreaks instead? Or maybe this would cause more problems than it would fix?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.