question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is inline image rendering possible?

See original GitHub issue

Do you want to request a feature or report a bug? Feature

What is the current behavior? In every Draft example, images are converted to ‘atomic’ blocks. This only covers one possible rendering of tags. There is a common use case for rendering images inline (for example, displaying rendered MathML or sparkline graphs).

This question was asked in #316 but was not given a clear answer. This was also asked in the Slack channel and kind respondents pointed to the draft-js-plugins repo for both images and emojis as examples, but neither solve the problem.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. You can use this jsfiddle to get started: https://jsfiddle.net/stopachka/m6z0xn4r/.

What is the expected behavior? A rich text editor should have the ability to render images inline with text.

Which versions of Draft.js, and which browser / OS are affected by this issue? Did this work in previous versions of Draft.js? 0.10.1

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7

github_iconTop GitHub Comments

2reactions
chengzhenpingcommented, Apr 4, 2019

@chengzhenping a year passed, have you found a solution

not really , I gave up.

1reaction
corinna000commented, Jul 30, 2018

Ultimately, our team switched to Quill because we absolutely needed to display math formulas as inline gifs. We spent a whole sprint trying to engineer a solution with Draft, but determined that Draft’s low-level design prevented us from achieving our goal, and that we didn’t want to undertake the work of making the necessary changes to Draft that would accomplish inline images with correct backspacing behaviour.

Read more comments on GitHub >

github_iconTop Results From Across the Web

image-rendering - CSS: Cascading Style Sheets | MDN
The image-rendering CSS property sets an image scaling algorithm. The property applies to an element itself, to any images set in its other ......
Read more >
image-rendering - CSS-Tricks
The image-rendering property defines how the browser should render an image if it is scaled up or down from its original dimensions.
Read more >
Display Img and Div inline - it's not rendered inline
In orde to achieve that - I've used display:inline property. But then I experienced the following issue: image renders from the center line, ......
Read more >
Rendering ALT text for images as inline and expanding the ...
When an image is unavailable - for whatever reasons -, then its alt text should be rendered inline and use as much space...
Read more >
inline images in HTML mail do not render properly in iNotes
In-line image should display/render as expected. Workaround. NA. Defect Status. Open. Problem Resolution. This ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found