Skip to content

Conversation

@planarvoid
Copy link
Contributor

Previously we've added the option to addMediaAfterBlocks. This works well with almost all the blocks but it doesn't work nicely with paragraphs. We want to be able to add images within paragraphs and not only after the currently selected paragraph. This is important for paragraphs with linebreaks (where the image should be logically positioned at the linebreak, not after the paragraph).

You can test this by setting EXAMPLE to

<p>test<br>
<br>
test</p>

Test

  1. Turn on addMediaAfterBlocks on the visual editor
  2. Run the app with the EXAMPLE set from the code above
  3. Click between the lines
  4. Add an image
  5. Notice it gets added between the lines, not at the end of the document

Review

@danilo04

Make sure strings will be translated:

  • If there are new strings that have to be translated, I have added them to the client's strings.xml as a part of the integration PR.

@planarvoid planarvoid requested a review from danilo04 May 30, 2022 11:18
@planarvoid planarvoid self-assigned this May 30, 2022
Copy link
Contributor

@danilo04 danilo04 left a comment

Choose a reason for hiding this comment

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

Hi @planarvoid. The changes are working as expected. Thanks!!

@danilo04 danilo04 merged commit ec0ff77 into trunk May 31, 2022
@danilo04 danilo04 deleted the fix/enable-media-in-paragraph-blocks branch May 31, 2022 16:50
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.

3 participants