Send HTML if there are any entities present in the composer
This is so that pasted HTML links that are represented as entities are sent as HTML.
This commit is contained in:
parent
55e1202c09
commit
4b96963408
1 changed files with 8 additions and 0 deletions
|
@ -591,6 +591,14 @@ export default class MessageComposerInput extends React.Component {
|
|||
}
|
||||
});
|
||||
}
|
||||
if (!shouldSendHTML) {
|
||||
const hasAnEntity = blocks.some((block) => {
|
||||
return block.getCharacterList().filter((c) => {
|
||||
return c.getEntity();
|
||||
}).size > 0;
|
||||
});
|
||||
shouldSendHTML = hasAnEntity;
|
||||
}
|
||||
if (shouldSendHTML) {
|
||||
contentHTML = HtmlUtils.processHtmlForSending(
|
||||
RichText.contentStateToHTML(contentState),
|
||||
|
|
Loading…
Reference in a new issue