Updating composer to fix line breaks and other rich text issues

• Updating:
- composer to fix line breaks and other rich text issues
This commit is contained in:
mgabdev
2020-06-19 21:02:13 -04:00
parent a9a566e211
commit fc80955306
6 changed files with 54 additions and 36 deletions

View File

@@ -88,6 +88,7 @@ class ComposeForm extends ImmutablePureComponent {
reduxReplyToId: PropTypes.string,
hasPoll: PropTypes.bool,
selectedGifSrc: PropTypes.string,
isPro: PropTypes.bool,
};
static defaultProps = {
@@ -244,6 +245,7 @@ class ComposeForm extends ImmutablePureComponent {
isChangingUpload,
isSubmitting,
selectedGifSrc,
isPro,
} = this.props
const disabled = isSubmitting
@@ -322,6 +324,8 @@ class ComposeForm extends ImmutablePureComponent {
onPaste={onPaste}
autoFocus={shouldAutoFocus}
small={shouldCondense}
isPro={isPro}
isEdit={!!edit}
id='comment-composer'
/>
@@ -414,6 +418,8 @@ class ComposeForm extends ImmutablePureComponent {
onPaste={onPaste}
autoFocus={shouldAutoFocus}
small={shouldCondense}
isPro={isPro}
isEdit={!!edit}
id='main-composer'
/>

View File

@@ -90,12 +90,13 @@ const mapStateToProps = (state, props) => {
quoteOfId: state.getIn(['compose', 'quote_of_id']),
scheduledAt: state.getIn(['compose', 'scheduled_at']),
account: state.getIn(['accounts', me]),
isPro: state.getIn(['accounts', me, 'is_pro']),
hasPoll: state.getIn(['compose', 'poll']),
selectedGifSrc: state.getIn(['tenor', 'selectedGif', 'src']),
}
}
const mapDispatchToProps = (dispatch, { reduxReplyToId, replyToId, isStandalone }) => ({
const mapDispatchToProps = (dispatch, { isStandalone }) => ({
onChange(text, markdown, newReplyToId, position) {
dispatch(changeCompose(text, markdown, newReplyToId, isStandalone, position))