Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Make default text content of img blocks a little camera emoji #1378

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/model/encoding/convertFromHTMLToContentBlocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,10 @@ function genFragment(
});
// Forcing this node to have children because otherwise no entity will be
// created for this node.
node.textContent = ' ';
// The child text node cannot just have a space or return as content -
// we strip those out.
// See https://github.com/facebook/draft-js/issues/231 for some context.
node.textContent = '\ud83d\udcf7';

// TODO: update this when we remove DraftEntity entirely
inEntity = DraftEntity.__create(
Expand Down