mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-21 04:11:50 +03:00
fix image insert issue
This commit is contained in:
parent
bd98ee843f
commit
c98da9143f
@ -7,7 +7,7 @@ export default async ({ text, selection, setTextAndSelection, items }) => {
|
||||
let newSelection = selection;
|
||||
|
||||
items.forEach(item => {
|
||||
if(item.url && item.text){
|
||||
if(item.url){
|
||||
const formatedText = `\n${imagePrefix}[${item.text}](${item.url})\n`
|
||||
newText = replaceBetween(newText, newSelection, formatedText);
|
||||
const newIndex = newText && newText.indexOf(item.url, newSelection.start) + item.url.length + 2;
|
||||
|
Loading…
Reference in New Issue
Block a user