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
Assume selection is text when creating a link #8071
Assume selection is text when creating a link #8071
Conversation
a0a17b8
to
698b41b
Compare
Codecov Report
@@ Coverage Diff @@
## master #8071 +/- ##
==========================================
- Coverage 32.71% 32.71% -0.01%
==========================================
Files 1194 1194
Lines 12969 12970 +1
Branches 1280 1280
==========================================
Hits 4243 4243
- Misses 7886 7887 +1
Partials 840 840
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
In order to make the selected change you'll also need to update Wysiwyg/constants.js
file L.79 with the following:
{
label: 'Link',
style: 'LINK',
className: 'link',
hideLabel: true,
handler: 'addContent',
text: '[textToReplace](link)',
},
packages/strapi-plugin-content-manager/admin/src/components/Wysiwyg/helpers.js
Outdated
Show resolved
Hide resolved
Fixes strapi#7890 Signed-off-by: Jonas De Kegel <jonas@fluid.desi>
698b41b
to
24c31b4
Compare
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.
LGTM!
Thanks a lot for your contribution.
@soupette You're welcome! |
Appart from adding some tests to this component not much. Even though the coverage doesn't pass we will still merge this PR. |
Fixes strapi#7890 Signed-off-by: Jonas De Kegel <jonas@fluid.desi>
Fixes #7890
Description of what you did:
Title says it all, when replacing a selection, assume the selection is text and not a link; as per the issue