Skip to content

Serialize image attributes for content editor

Brett Walker requested to merge bw-content-editor-image-attributes into master

What does this MR do and why?

When image width/height is specified, allow content editor maintain and serialize back to image attributes, such as {width="100%"}

Related to #384717 (closed)

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

  1. Go to wiki and create a new page

  2. Go to the Source tab and enter: ![](https://about.gitlab.com/images/press/logo/png/gitlab-logo-500.png){width="100"}

    Screenshot_2022-12-13_at_4.22.56_PM

  3. Go to the Rich Text tab, you should see

    Screenshot_2022-12-13_at_4.25.37_PM

  4. Click at the end of the image and enter plus some text

    Screenshot_2022-12-13_at_4.26.35_PM

  5. Go to the Source tab, you should see ![](https://about.gitlab.com/images/press/logo/png/gitlab-logo-500.png){width="100"} plus some text

    Screenshot_2022-12-13_at_4.27.23_PM

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Brett Walker

Merge request reports