Revize 4d9f6366
Přidáno uživatelem Vojtěch Bartička před téměř 3 roky(ů)
Backend/Core/Services/HTMLService/HTMLService.cs | ||
---|---|---|
170 | 170 |
{ |
171 | 171 |
markerPosition = EPosition.MARK_LEFT_RIGHT; |
172 | 172 |
} |
173 |
else if (selectionEnd == end) |
|
174 |
{ |
|
175 |
markerPosition = EPosition.MARK_RIGHT; |
|
176 |
} |
|
177 |
else if (selectionStart == start) |
|
178 |
{ |
|
179 |
markerPosition = EPosition.MARK_LEFT; |
|
180 |
} |
|
173 | 181 |
|
174 | 182 |
HtmlNode spanSelected = CreateSpan(docToEdit, textSelected, TagStartPositions.Count, tag.Instance, tag.Id, start, markerPosition); |
175 | 183 |
parentNode.ChildNodes.Insert(nodeIndex, spanSelected); |
... | ... | |
192 | 200 |
int spanSelectedStart = start; |
193 | 201 |
int spanAfterStart = start + textSelected.Length; |
194 | 202 |
|
195 |
HtmlNode spanSelected = CreateSpan(docToEdit, textSelected, TagStartPositions.Count, tag.Instance, tag.Id, spanSelectedStart, EPosition.MARK_RIGHT); |
|
203 |
var position = EPosition.MARK_RIGHT; |
|
204 |
if (selectionStart == start) |
|
205 |
{ |
|
206 |
position = EPosition.MARK_LEFT_RIGHT; |
|
207 |
} |
|
208 |
|
|
209 |
HtmlNode spanSelected = CreateSpan(docToEdit, textSelected, TagStartPositions.Count, tag.Instance, tag.Id, spanSelectedStart, position); |
|
196 | 210 |
parentNode.ChildNodes.Insert(nodeIndex, spanSelected); |
197 | 211 |
|
198 | 212 |
HtmlNode spanAfter = CreateSpan(docToEdit, textAfter, TagStartPositions.Count, null, null, spanAfterStart); |
... | ... | |
216 | 230 |
int spanBeforeStart = start; |
217 | 231 |
int spanSelectedStart = start + textBefore.Length; |
218 | 232 |
|
233 |
var position = EPosition.MARK_LEFT; |
|
234 |
if (selectionEnd == end) |
|
235 |
{ |
|
236 |
position = EPosition.MARK_LEFT_RIGHT; |
|
237 |
} |
|
238 |
|
|
219 | 239 |
HtmlNode spanBefore = CreateSpan(docToEdit, textBefore, TagStartPositions.Count, null, null, spanBeforeStart); |
220 | 240 |
parentNode.ChildNodes.Insert(nodeIndex, spanBefore); |
221 | 241 |
|
222 |
HtmlNode spanSelected = CreateSpan(docToEdit, textSelected, TagStartPositions.Count, tag.Instance, tag.Id, spanSelectedStart, EPosition.MARK_LEFT);
|
|
242 |
HtmlNode spanSelected = CreateSpan(docToEdit, textSelected, TagStartPositions.Count, tag.Instance, tag.Id, spanSelectedStart, position);
|
|
223 | 243 |
parentNode.ChildNodes.Insert(nodeIndex + 1, spanSelected); |
224 | 244 |
|
225 | 245 |
return new() { spanSelected, spanBefore }; |
Také k dispozici: Unified diff
Fixed annotation underline not having correct start and end marks