mirror of
https://github.com/outline/outline.git
synced 2026-12-06 11:12:32 +03:00
When applying a template to a document, the replaceSelectionWith method was incorrectly trying to insert a document node into the existing document, which caused the template content to be added after existing content (like empty paragraphs) rather than replacing it entirely. This fix changes the approach to replace the entire document content with the template content using tr.replace(), ensuring that templates are applied cleanly without extra linebreaks. Fixes #10508