mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-27 19:20:24 +08:00
Updated: support custom paste link template
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
import db from '../../datastore'
|
||||
|
||||
export default (style, url) => {
|
||||
const customLink = db.read().get('customLink').value() || '$url'
|
||||
const tpl = {
|
||||
'markdown': ``,
|
||||
'HTML': `<img src="${url}"/>`,
|
||||
'URL': url,
|
||||
'UBB': `[IMG]${url}[/IMG]`
|
||||
'UBB': `[IMG]${url}[/IMG]`,
|
||||
'Custom': customLink.replace(/\$url/, url)
|
||||
}
|
||||
return tpl[style]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user