SVG (NOT IMAGE) field

Created on 24 September 2024, 9 months ago

Problem/Motivation

There are so many parts of this module I like.

  1. The media management
  2. The ability to have full control over the contents of the svg
  3. The user interaction of selecting an icon from the media library

I just which I could choose when I want to interact with the SVG like it's an image and when I want it to be an inline element.

Did you know you SVGs are perfectly happy receiving a CSS Rule such as display: inline-block. In that way, it behaves like any other inline element that is surrounded by a block level element.

That use case is not supported with this module (as far as I can tell).

Steps to reproduce

1. Create a paragraph of text within a text editor.
2. Insert an svg in the middle of the paragraph.
3. View the result in source
4. Observe that the paragraph of text is now broken into two parts, where the svg was inserted.

This was not the intended result.

Proposed resolution

Allow for the option that the the <img /> or <svg /> does not do the following:

  1. elements are not wrapped with templates that add needless <article /> or <div /> tags
  2. Teach CKEditor to inline the markup. Meaning the tag can persist within a block level element.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

2.3

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States cosmicdreams Minneapolis/St. Paul

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @cosmicdreams
  • πŸ‡ΊπŸ‡ΈUnited States cosmicdreams Minneapolis/St. Paul
  • πŸ‡¨πŸ‡¦Canada mandclu

    @cosmicdreams can you provide code examples of the current, generated markup, as well as what you are proposing?

  • Status changed to Postponed: needs info 23 days ago
  • πŸ‡ͺπŸ‡¨Ecuador jwilson3

    I'm clarifying what I understand to be "the ask" in the issue title.

    I'm just curious why you couldn't do this with CSS though. Is there some default drupal behavior that looks broken without such an option built into the module?

Production build 0.71.5 2024