Browse Source

Fix editing monospace text

master
Eduard Kuzmenko 3 years ago
parent
commit
bc10b6deb8
  1. 2
      src/helpers/dom/getRichElementValue.ts
  2. 5
      src/scss/partials/_chat.scss

2
src/helpers/dom/getRichElementValue.ts

@ -30,7 +30,7 @@ export const markdownTags: {[type in MarkdownType]: MarkdownTag} = {
entityName: 'messageEntityItalic' entityName: 'messageEntityItalic'
}, },
monospace: { monospace: {
match: '[style*="monospace"], [face="monospace"]', match: '[style*="monospace"], [face="monospace"], pre',
entityName: 'messageEntityPre' entityName: 'messageEntityPre'
}, },
strikethrough: { strikethrough: {

5
src/scss/partials/_chat.scss

@ -130,6 +130,11 @@ $chat-helper-size: 36px;
white-space: pre-wrap; white-space: pre-wrap;
font-size: var(--messages-text-size); font-size: var(--messages-text-size);
line-height: var(--line-height); line-height: var(--line-height);
pre {
display: inline;
margin: 0;
}
@include animation-level(2) { @include animation-level(2) {
transition: height .1s; transition: height .1s;

Loading…
Cancel
Save