Posted 17 years ago
by Dan
-
Software dev.,
IBM Global sevices / Rational Software
Version: 4.0.0258
I am using the syntax editor control to do syntax highlighting in our application & I want the user to be able to save the current document to a file.
I am using the following code to save the document:When saving to an HTML document it is written inside of the "View Source" the following:
<title>Actipro SyntaxEditor Document Text</title>
Code highlighting produced by Actipro SyntaxEditor
http://www.ActiproSoftware.com/Products/DotNet/
How can we tell the control not to write these strings ?
I am using the following code to save the document:
SaveFileDialog sfd = new SaveFileDialog();
sfd.Filter = "Web Page (*.html)|*.html|Rich Text Format (*.rtf)|*.rtf|Plain Text Unicode Format (*.txt)|*.txt";
if (DialogResult.OK == sfd.ShowDialog())
{
switch (sfd.FilterIndex)
{
case 1:
syntaxEditorControl.Document.SaveFileAsHtml(sfd.FileName + ".Html", HtmlExportType.ClassBased, LineTerminator.CarriageReturnNewline);
break;
case 2:
syntaxEditorControl.Document.SaveFileAsRtf(sfd.FileName + ".Rtf", syntaxEditorControl.Font, LineTerminator.CarriageReturnNewline);
break;
case 3:
syntaxEditorControl.Document.SaveFile(sfd.FileName + ".Txt", Encoding.Unicode, LineTerminator.CarriageReturnNewline);
break;
}
}
<title>Actipro SyntaxEditor Document Text</title>
Code highlighting produced by Actipro SyntaxEditor
http://www.ActiproSoftware.com/Products/DotNet/
How can we tell the control not to write these strings ?