Skip to content

Insert images in the Content Editor

Problem to solve

In order to support the full CommonMark spec, the Content Editor must be support rendering and editing all the elements of the standard implementation .

Here, we are focused on inserting or uploading images.

Intended users

User experience goal

The user should be able to insert and upload images in the Content Editor.

Proposal

Create an extension for the Content Editor that supports inserting a new image.

  • An icon should be displayed in the toolbar. The toolbar icon will display custom UI that allows you to reference an existing image URL manually or upload a new image.
  • Dragging an image into the content editor should upload that image and insert it at the cursor's current position
  • An image should be able to be pasted from the clipboard

Details

Extensions to the Content Editor require a few specific details:

Input Rule N/A
Paste Rule [paste_rule]
Toolbar Button https://gitlab.com/gitlab-org/gitlab-svgs/blob/main/sprite_icons/doc-image.svg
Keyboard Shortcut [shortcut]
Instrumentation [event_name]

Documentation

Availability & Testing

Available Tier

This feature, as with the content editor itself, is available on both SaaS and Self-managed Free tiers

What does success look like, and how can we measure that?

An event should be added to track inserting new images through the UI. We aren't interested in tracking every instance of an image in existing content, but it would be great to know how often this extension is invoked through the editor, and whether it is done by using the toolbar, keyboard shortcut, or by typing directly into the editor.

What is the type of buyer?

Is this a cross-stage feature?

Links / references

This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.

Edited by 🤖 GitLab Bot 🤖