mirror of
https://github.com/ecency/ecency-mobile.git
synced 2025-01-03 19:42:03 +03:00
Fixed image upload erro
This commit is contained in:
parent
f337dccc47
commit
f8cdb22b93
@ -30,10 +30,17 @@ export default ({
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
newText = replaceBetween(text, selection, `${imagePrefix}[${itemText}](${itemUrl})`);
|
newText = replaceBetween(text, selection, `${imagePrefix}[${itemText}](${itemUrl})`);
|
||||||
newSelection = {
|
if (isImage) {
|
||||||
start: selection.start + 1,
|
newSelection = {
|
||||||
end: selection.start + 1 + itemText && itemText.length,
|
start: newText && newText.length,
|
||||||
};
|
end: newText && newText.length,
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
newSelection = {
|
||||||
|
start: selection.start + 1,
|
||||||
|
end: selection.start + 1 + (itemText && itemText.length),
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
setState({ text: newText }, () => {
|
setState({ text: newText }, () => {
|
||||||
setState({ newSelection });
|
setState({ newSelection });
|
||||||
|
Loading…
Reference in New Issue
Block a user