Skip to content

Being able to define shape in HTML #5420

@denis-migdal

Description

@denis-migdal
  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Is your feature request related to a problem? Please describe.

I'm currently using drawio to generate SVG I then use inside a Web page.
In this image, I add some HTML inputs.

Currently, we can write HTML inside labels. However, labels do not completely fill their parents.

Describe the solution you'd like

I'd like to be able to do "file -> import -> an HTML file" to produce something like:

<svg xmlns="http://www.w3.org/2000/svg" width="200" height="100">
  <foreignObject style="overflow: visible;" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
      <div xmlns="http://www.w3.org/1999/xhtml" style="width: 100%; height: 100%;">
        <input type="text" style="width:100%; height:100%; box-sizing:border-box;" />
      </div>
  </foreignObject>
</svg>

I'd also like to be able to edit the raw data of imported elements (SVG and/or HTML) through a simple text input.
This could be done through a popup similar to "+ -> shape...". I'm not asking for a complete SVG editor like a previous issue asked.

The behavior would be identical to the importation, only the text input would be used as a source instead of a file, and the current imported element would be replaced by the edited one.

Describe alternatives you've considered

Creating the SVG containing the HTML myself, then importing it into drawio.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions