You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-11 20:22:36 +03:00
special-case 'inline-code' button because mark is called 'code'
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -334,7 +334,9 @@ export default class MessageComposer extends React.Component {
|
|||||||
if (this.state.showFormatting && this.state.inputState.isRichTextEnabled) {
|
if (this.state.showFormatting && this.state.inputState.isRichTextEnabled) {
|
||||||
const {marks, blockType} = this.state.inputState;
|
const {marks, blockType} = this.state.inputState;
|
||||||
const formatButtons = formatButtonList.map((name) => {
|
const formatButtons = formatButtonList.map((name) => {
|
||||||
const active = marks.some(mark => mark.type === name) || blockType === name;
|
// special-case to match the md serializer and the special-case in MessageComposerInput.js
|
||||||
|
const markName = name === 'inline-code' ? 'code' : name;
|
||||||
|
const active = marks.some(mark => mark.type === markName) || blockType === name;
|
||||||
const suffix = active ? '-on' : '';
|
const suffix = active ? '-on' : '';
|
||||||
const onFormatButtonClicked = this.onFormatButtonClicked.bind(this, name);
|
const onFormatButtonClicked = this.onFormatButtonClicked.bind(this, name);
|
||||||
const className = 'mx_MessageComposer_format_button mx_filterFlipColor';
|
const className = 'mx_MessageComposer_format_button mx_filterFlipColor';
|
||||||
|
|||||||
Reference in New Issue
Block a user