-
Notifications
You must be signed in to change notification settings - Fork 91
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
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice, just two questions, not blocking
attrs: { href: link, title: 'preview' }, | ||
content: [{ | ||
type: 'text', | ||
marks: [{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems a bit unexpected that the preview node still has an additional mark, can you tell why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
/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
)