The original comment and sample formula are based on the assumption that the source document always ends in CRLF and SyntaxEditor only has LF. The idea is that for every line after the first, SyntaxEditor will be off by one character due to the missing CR. This crude example illustrates the concept, where each number represents the offset at that position of the document.
01 <-- CRLF (Offsets 2 & 3, Line 0)
45 <-- CRLF (Offsets 6 & 7, Line 1)
89 <-- ( Line 2)
01 <-- LF (Offset 2, Line 0)
34 <-- LF (Offset 5, Line 1)
67 <-- ( Line 2)
YourOffset - YourLineIndex = SyntaxEditorOffset
1 - 0 = 1
4 - 1 = 3
8 - 2 = 6
9 - 2 = 7
I included a few examples of where a offset in the original was converted to SyntaxEditor based on the original offset and line index. As mentioned earlier, this assumes every line ends with CRLF. If there is any variation in line endings, you would not be able to use such a simple formula.
If line endings are inconsistent, you'd have to maintain your own mapping of the start offset for each line in the original compared to the start offset of each line reported by SyntaxEditor. Then you'd be able to use the relative character position on a line to translate the document offset between the two document sources.