Skip to content

feat(joint-react): support for HTML rendering outside the graph #2951

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 11 commits into
base: dev
Choose a base branch
from

Conversation

samuelgja
Copy link
Contributor

@samuelgja samuelgja commented May 1, 2025

Description

Add support for render HTML elements outside the graph via new property inside the paper:

  /**
   * Enabled if renderElements is render to pure HTML elements.
   * By default, `joint/react` renderElements to SVG elements, so for using HTML elements without this prop, you need to use `foreignObject` element.
   * @default false
   */
  readonly isHTMLRendererEnabled?: boolean;

If enabled, renderElement is HTML instead of SVG.

Motivation and Context

This provides us support for safari browser and other browsers which do not support foreignObject properly.

Screenshots (if appropriate):

Screen.Recording.2025-05-01.at.13.56.50.mov

@samuelgja samuelgja self-assigned this May 1, 2025
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