/// <summary> /// Gets the edited content. /// </summary> /// <returns>The content.</returns> public string GetContent() { if (inWYSIWYG) { return(ReverseFormatter.ReverseFormat(lblWYSIWYG.Text)); } return(txtMarkup.Text); }
protected void btnWikiMarkup_Click(object sender, EventArgs e) { SelectTab(0); //added for WYSIWYG //if last view was WYSIWYG take text from WYSIWYG to Markup if (inWYSIWYG) { txtMarkup.Text = ReverseFormatter.ReverseFormat(lblWYSIWYG.Text); } //end }
/// <summary> /// Gets the edited content. /// </summary> /// <returns>The content.</returns> public string GetContent() { if (inWYSIWYG) { ReverseFormatter reverseFormatter = new ReverseFormatter(); return(reverseFormatter.ReverseFormat(currentWiki, lblWYSIWYG.Text)); } else { return(txtMarkup.Text); } }
protected void btnPreview_Click(object sender, EventArgs e) { SelectTab(2); //added for WYSIWYG //if last view was WYSIWYG take text from WYSIWYG to Preview //in both cases I need to synchronize WYSIWYG and Markup view if (inWYSIWYG) { lblPreview.Text = lblWYSIWYG.Text.Replace("<", "<").Replace(">", ">"); txtMarkup.Text = ReverseFormatter.ReverseFormat(lblWYSIWYG.Text); } else { lblPreview.Text = FormattingPipeline.FormatWithPhase3(FormattingPipeline.FormatWithPhase1And2(txtMarkup.Text, false, FormattingContext.Unknown, null), FormattingContext.Unknown, null); //lblWYSIWYG.Text = lblPreview.Text; lblWYSIWYG.Text = Formatter.Format(txtMarkup.Text, false, FormattingContext.Unknown, null, out var links, true); } //end }