Rich Text Editor (WIP)
This commit is contained in:
@@ -263,7 +263,7 @@ export function submitCompose(group, replyToId = null, router, isStandalone) {
|
||||
if (!me) return;
|
||||
|
||||
let status = getState().getIn(['compose', 'text'], '');
|
||||
const markdown = getState().getIn(['compose', 'markdown'], '');
|
||||
let markdown = getState().getIn(['compose', 'markdown'], '');
|
||||
const media = getState().getIn(['compose', 'media_attachments']);
|
||||
|
||||
// : hack :
|
||||
@@ -276,10 +276,13 @@ export function submitCompose(group, replyToId = null, router, isStandalone) {
|
||||
}
|
||||
return hasProtocol ? match : `http://${match}`
|
||||
})
|
||||
// markdown = statusMarkdown.replace(urlRegex, (match) =>{
|
||||
// const hasProtocol = match.startsWith('https://') || match.startsWith('http://')
|
||||
// return hasProtocol ? match : `http://${match}`
|
||||
// })
|
||||
markdown = markdown.replace(urlRegex, (match) =>{
|
||||
const hasProtocol = match.startsWith('https://') || match.startsWith('http://')
|
||||
if (!hasProtocol) {
|
||||
if (status.indexOf(`@${match}`) > -1) return match
|
||||
}
|
||||
return hasProtocol ? match : `http://${match}`
|
||||
})
|
||||
|
||||
const inReplyToId = getState().getIn(['compose', 'in_reply_to'], null) || replyToId
|
||||
|
||||
|
||||
Reference in New Issue
Block a user