Skip to content

fix: make bold and italic tags persist after block conversion (text type)#42

Closed
vvidday wants to merge 3 commits intoDashibase:mainfrom
vvidday:fix/keep-tags
Closed

fix: make bold and italic tags persist after block conversion (text type)#42
vvidday wants to merge 3 commits intoDashibase:mainfrom
vvidday:fix/keep-tags

Conversation

@vvidday
Copy link
Contributor

@vvidday vvidday commented Aug 4, 2022

Currently, converting between text type blocks (text <-> quote / text->text / quote->quote) results in loss of bold and italic tags

  • Modified Lotion.vue::setBlockType to use html content instead of text content when target block is text/quote (solves conversion with no search)
  • Modified Block.vue::clearSearch to take into account html content - now if type of block before conversion is text/quote, it will store the html content in addition to the text content, and if the type of block after conversion is text/quote, it will use the stored html content. (solves conversion via search)
video

keeptags-before
keeptags-after

Tags are still lost when converting to heading types, could potentially find a workaround with the current implementation but @holazz's refactor in #39 will potentially make it much easier (I think we would be able to use the same logic as text blocks)

@vvidday
Copy link
Contributor Author

vvidday commented Aug 5, 2022

Apologies, I made a mistake when rebasing so the commit history is unclear. I'll make a new PR with the same changes.

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.

1 participant