Hi all,
I frequently use the new text from photo feature to capture text from books for later reference. Unfortunately this produces some kind of new lines where there are new lines in the original text:
I tried to get rid of them with the following JavaScript snippet:
newLine = "\n"
replace = " "
content = draft.content.replaceAll(newLine, replace)
content = draft.content.replaceAll(" ", " ")
draft.content = content
This works with texts where I inserted new lines by myself, but not with the pasted text from the photo. I also tested the \r escape sequence, it didn’t work.
Any ideas?
Thanks in advance!