Add BBCode compositing option

This commit is contained in:
Haelwenn (lanodan) Monnier 2019-05-06 02:25:45 +02:00
parent 560859e90a
commit 456a0f0672
No known key found for this signature in database
GPG key ID: D5B7A8E43C997DEE
2 changed files with 12 additions and 1 deletions

View file

@ -6,3 +6,4 @@ Additions
--------- ---------
- `build.sh`: Add error reporting+failing - `build.sh`: Add error reporting+failing
- UI: Limit the inlined-images to a maximum size (400px tall & width of the post) - UI: Limit the inlined-images to a maximum size (400px tall & width of the post)
- Compositing: Add BBCode content-type option

View file

@ -61,6 +61,10 @@ const messages = defineMessages({
defaultMessage: 'Markdown', defaultMessage: 'Markdown',
id: 'compose.content-type.markdown', id: 'compose.content-type.markdown',
}, },
bbcode: {
defaultMessage: 'BBCode',
id: 'compose.content-type.bbcode',
},
plain: { plain: {
defaultMessage: 'Plain text', defaultMessage: 'Plain text',
id: 'compose.content-type.plain', id: 'compose.content-type.plain',
@ -252,6 +256,11 @@ class ComposerOptions extends ImmutablePureComponent {
name: 'text/markdown', name: 'text/markdown',
text: <FormattedMessage {...messages.markdown} />, text: <FormattedMessage {...messages.markdown} />,
}, },
bbcode: {
icon: 'bold',
name: 'text/bbcode',
text: <FormattedMessage {...messages.bbcode} />,
},
}; };
// The result. // The result.
@ -358,6 +367,7 @@ class ComposerOptions extends ImmutablePureComponent {
contentTypeItems.plain, contentTypeItems.plain,
contentTypeItems.html, contentTypeItems.html,
contentTypeItems.markdown, contentTypeItems.markdown,
contentTypeItems.bbcode,
]} ]}
onChange={onChangeContentType} onChange={onChangeContentType}
onModalClose={onModalClose} onModalClose={onModalClose}