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

Support for decorators when linking images #7634

Merged
merged 2 commits into from
Jul 20, 2020
Merged

Support for decorators when linking images #7634

merged 2 commits into from
Jul 20, 2020

Conversation

pomek
Copy link
Member

@pomek pomek commented Jul 16, 2020

Suggested merge commit message (convention)

Fix (link): Manual and automatic decorators will work properly with a link that is labeled by an image. Closes #7519.

Internal (link): An icon that indicates that the image is linked will not be displayed in the editor's data. Closes #7626.

☝️ marking as internal since the icon and the bug was introduced in the same iteration.

@pomek pomek requested a review from jodator July 16, 2020 12:52
Copy link
Contributor

@jodator jodator left a comment

Choose a reason for hiding this comment

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

LGTM, I'd change only how the AutomaticDecorators instance is passed and where it is created.

The other comment about name, location, etc actually is for current implementation but as we already have that let's keep that part consistent.

@jodator jodator merged commit d38b5e5 into master Jul 20, 2020
@jodator jodator deleted the i/7519 branch July 20, 2020 10:26
@confettidc
Copy link

Hi all, I have already updated @ckeditor/ckeditor5-link to version 20.0.0, but below problem still persists, can help check?

WhatsApp Video 2020-07-25 at 01.50.06.mp4.zip

CkEditor config (just copied related options):
ClassicEditor.create(document.getElementById( elementId ), {
toolbar: [ 'undo', 'redo', '|', 'indent', 'outdent', 'alignment', 'bold', 'italic', 'underline', '|', 'FontSize', 'FontColor', '|', 'insertTable', 'imageUpload', 'mediaEmbed', '|', 'strikethrough', 'link', 'subscript', 'superscript', 'bulletedList', 'numberedList', 'HorizontalLine'],
link: {
decorators: {
isExternal: {
mode: 'manual',
label: '',
attributes: {
target: '_blank',
rel: 'noopener noreferrer'
}
}
}
},

        image: {
        	toolbar: [ 'imageTextAlternative', '|', 'imageStyle:alignLeft', 'imageStyle:full', 'imageStyle:alignRight', 'linkImage' ],

            styles: [
                // This option is equal to a situation where no style is applied.
                'full',

                // This represents an image aligned to the left.
                'alignLeft',

                // This represents an image aligned to the right.
                'alignRight'
            ]
        },

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants