Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Enable <img> inside <p> conversion #107

Merged
merged 6 commits into from
May 3, 2017
Merged

Enable <img> inside <p> conversion #107

merged 6 commits into from
May 3, 2017

Conversation

scofalik
Copy link
Contributor

@scofalik scofalik commented Apr 26, 2017

Suggested merge commit message (convention)

Feature: <img> view elements placed inside <p> elements are now converted to a proper model structure both on setData() and pasting (instead of being cleaned). Closes ckeditor/ckeditor5#5092.


Additional information

This implements "autohoisting" idea, that is breaking ancestor(s) of an element if that element would be allowed in context without that ancestor(s). The idea is described in original issue ckeditor/ckeditor5#5092 and also here: https://github.com/ckeditor/ckeditor5-engine/issues/924

Because there were some conceptual problems with introducing generic autohoisting mechanism, I implemented autohoisting just for images for now.

);
} );

it( 'multiple images', () => {
Copy link
Member

Choose a reason for hiding this comment

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

Uh... I looked for that test being afraid that you haven't thought about it :D 🥇

@Reinmar
Copy link
Member

Reinmar commented May 3, 2017

I have simplified bits of your PR. I'm a bit sad that it raises the complexity of the conversion in this feature even more but we have to live with this for a moment. At least, we'll have a lot of material to review when reviewing conversion after 1.0.0 alpha :D

@Reinmar Reinmar merged commit e2104b1 into master May 3, 2017
@Reinmar Reinmar deleted the t/98 branch May 3, 2017 12:07
@Reinmar
Copy link
Member

Reinmar commented May 3, 2017

Make sure to read the commit message that I wrote. I focused on a bit different level – hopefully, more digestible for the readers.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable <img> inside <p> conversion
2 participants