Skip to content
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 Allow wrapping an image in a link #2883

Conversation

GuySartorelli
Copy link
Member

@GuySartorelli GuySartorelli commented Sep 6, 2023

Relies on logic added to silverstripe/admin, so we need to bump the constraint as well.

Behat test requires new logic added to the behat-extension module.

Make sure you check the installer CI run linked in the issue to see behat passing happily

Supercedes #2880

Requires

Issue

Relies on logic added to silverstripe/admin, so we need to bump the
constraint as well.

Behat test requires new logic added to the behat-extension module.
Comment on lines -97 to -104
getRequireLinkText() {
const selection = this.getElement().getEditor().getInstance().selection;
const selectionContent = selection.getContent() || '';
const tagName = selection.getNode().tagName;
const requireLinkText = tagName !== 'A' && selectionContent.trim() === '';

return requireLinkText;
},
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is now provided by silverstripe/admin instead

@emteknetnz emteknetnz merged commit ba578cf into silverstripe:4.13 Sep 6, 2023
@emteknetnz emteknetnz deleted the pulls/4.13/wrap-img-with-link branch September 6, 2023 22:24
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.

2 participants