Beispiel #1
0
        public void ClearHighlight()
        {
            DiscussionNote note = getOriginalNote();

            if (note == null)
            {
                return;
            }

            (Parent as DiscussionBox).setDiscussionNoteText(this, note);
            HighlightState = null;
        }
Beispiel #2
0
        public void HighlightFragment(int startPosition, int length)
        {
            DiscussionNote note = removeCodeBlocks(getOriginalNote());

            if (note == null)
            {
                return;
            }

            string         span        = wrapTextFragmentInSpan(startPosition, length, note);
            DiscussionNote updatedNote = cloneNoteWithNewText(getOriginalNote(), span);

            (Parent as DiscussionBox).setDiscussionNoteText(this, updatedNote);
            HighlightState = new HighlightState(startPosition, length);
        }