For the following MWE, I need the inline note to be in the same line without extra space or additional line breaks.
\documentclass{article}
\usepackage{todonotes}
\author{diaa}
\begin{document}
some text \todo[inline]{my note} another text
\end{document}
Output
My Desired Output
Edit #1
How to make the inline note behave like a normal piece of its respective paragraph?
In other words, I don't need the inline note to behave like this
or like this
Best Answer
You could do something like this (I assume that you are using pdflatex). There is imho no sensible way to get line breaks inside such todonotes, so I set a maximum size of 5cm. But as they will destroy the layout anyway I don't think that it matters much that you get large line spacing or bad line breaks with long notes.
The code naturally change all inline todos.
Edit
If you really need line breaks in the notes you can try to use this answer Cool Text Highlighting in LaTeX. Be aware that the soul code is rather fragile. Not everything can be put in the note text without protection. Read the documentation.
As an example (I don't have the time to adjust the style):