fix(SmartPicker): Insert smart picker links as preview per default#5846
fix(SmartPicker): Insert smart picker links as preview per default#5846
Conversation
|
Can we also do this when using the smart picker with typing |
f53e454 to
f88e45e
Compare
Fixes: #5838 Signed-off-by: Jonas <jonas@freesources.org>
f88e45e to
bc5f65c
Compare
Yep, implemented now. |
juliusknorr
left a comment
There was a problem hiding this comment.
Very nice, just two questions, not blocking
| attrs: { href: link, title: 'preview' }, | ||
| content: [{ | ||
| type: 'text', | ||
| marks: [{ |
There was a problem hiding this comment.
Seems a bit unexpected that the preview node still has an additional mark, can you tell why?
There was a problem hiding this comment.
I think it matches the data structure created otherwise. We basically change the wrapping block node between paragraph and preview when switching between the two:
The setPreview function above converts the surrounding paragraph of a link into a preview node:

If you look at unsetPreview above it also only unwraps the link inside the preview node:

|
/backport to stable29 |
Follow-up for #5846 Signed-off-by: Jonas <jonas@freesources.org>
Follow-up for #5846 Signed-off-by: Jonas <jonas@freesources.org>
Follow-up for #5846 Signed-off-by: Jonas <jonas@freesources.org>
Summary
Behaviour:
/command as it's impossible to have ane editor selection when typing/🖼️ Screenshots
🏁 Checklist
npm run lint/npm run stylelint/composer run cs:check)