mirror of
https://github.com/danog/telegram-tt.git
synced 2024-11-26 20:34:44 +01:00
Follow-up (#1361)
This commit is contained in:
parent
2feae100ba
commit
6fa1194bd3
@ -40,6 +40,7 @@ const TEXT_FORMAT_BY_TAG_NAME: Record<string, keyof ISelectedTextFormats> = {
|
||||
DEL: 'strikethrough',
|
||||
CODE: 'monospace',
|
||||
};
|
||||
const fragmentEl = document.createElement('div');
|
||||
|
||||
const TextFormatter: FC<OwnProps> = ({
|
||||
isOpen,
|
||||
@ -117,8 +118,9 @@ const TextFormatter: FC<OwnProps> = ({
|
||||
if (!selectedRange) {
|
||||
return undefined;
|
||||
}
|
||||
fragmentEl.innerText = selectedRange.toString();
|
||||
|
||||
return selectedRange.toString();
|
||||
return fragmentEl.innerHTML;
|
||||
}, [selectedRange]);
|
||||
|
||||
const getSelectedElement = useCallback(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user