{note.HtmlContent}
{referenceNote.HtmlContent}" ); } } return new RServiceResult
{note.HtmlContent}
{referenceNote.HtmlContent}" ); } } return new RServiceResult
"); if (nIndexFirstParagraphOpenning != -1) { int nIndexFirstParagraphClosing = html.IndexOf("
"); if (nIndexFirstParagraphClosing > nIndexFirstParagraphOpenning) { string paragraphContent = html.Substring(nIndexFirstParagraphOpenning + "".Length, 1 + nIndexFirstParagraphClosing - (nIndexFirstParagraphOpenning + "
".Length)); if (paragraphContent.Length != 0) { int openIndex = paragraphContent.IndexOf('<'); while (paragraphContent.Length > 0 && (openIndex != -1)) { string afterClosing = ""; int closeIndex = paragraphContent.IndexOf('>', openIndex); if (closeIndex != -1) afterClosing = paragraphContent.Substring(closeIndex + 1); paragraphContent = paragraphContent.Substring(0, openIndex) + afterClosing; openIndex = paragraphContent.IndexOf('<'); } paragraphContent = paragraphContent.Replace("<", "").Replace(">", ""); if (paragraphContent.Length > 100) paragraphContent = paragraphContent.Substring(0, 100) + " ..."; RTagValue toc = await TagHandler.PrepareAttribute(_context, "Title in TOC", paragraphContent, 1); toc.ValueSupplement = "1";//font size if (link.Item == null) { if (link.Artifact.Tags.Where(t => t.RTag.Name == "Title in TOC" && t.Value == toc.Value).Count() == 0) { toc.Order = 1 + link.Artifact.Tags.Where(t => t.RTag.NameInEnglish == "Title in TOC").Count(); link.Artifact.Tags.Add(toc); _context.Artifacts.Update(link.Artifact); } } else { if (link.Item.Tags.Where(t => t.RTag.Name == "Title in TOC" && t.Value == toc.Value).Count() == 0) { toc.Order = 1 + link.Item.Tags.Where(t => t.RTag.NameInEnglish == "Title in TOC").Count(); link.Item.Tags.Add(toc); _context.Items.Update(link.Item); } } } } } } } } } await _context.SaveChangesAsync(); return new RServiceResult"); if(nIndexFirstParagraphOpenning != -1) { int nIndexFirstParagraphClosing = html.IndexOf("
"); if(nIndexFirstParagraphClosing > nIndexFirstParagraphOpenning) { string paragraphContent = html.Substring(nIndexFirstParagraphOpenning + "".Length, 1 + nIndexFirstParagraphClosing - (nIndexFirstParagraphOpenning + "
".Length)); if (paragraphContent.Length == 0) continue; if (paragraphContent.Length > 100) paragraphContent = paragraphContent.Substring(0, 100) + " ..."; lst.Add(paragraphContent); RTagValue tag = await TagHandler.PrepareAttribute(_context, "Title in TOC", paragraphContent, 1); tag.ValueSupplement = "1";//font size if (link.Item == null) { if(link.Artifact.Tags.Where(t => t.RTag.Name == "Title in TOC" && t.Value == tag.Value).Count() == 0) { tag.Order = 1 + link.Artifact.Tags.Where(t => t.RTag.NameInEnglish == "Title in TOC").Count(); link.Artifact.Tags.Add(tag); _context.Artifacts.Update(link.Artifact); } } else { if (link.Item.Tags.Where(t => t.RTag.Name == "Title in TOC" && t.Value == tag.Value).Count() == 0) { tag.Order = 1 + link.Item.Tags.Where(t => t.RTag.NameInEnglish == "Title in TOC").Count(); link.Item.Tags.Add(tag); _context.Items.Update(link.Item); } } } } } } } } await _context.SaveChangesAsync(); return new RServiceResult