I am looking for control which could be used in ASP.Net, providing rich text editing function, like Office Live, Google Docs which could work on line. Another function needed is download into Microsoft Word format.
我正在寻找可以在ASP.Net中使用的控件,提供丰富的文本编辑功能,如Office Live,可以在线工作的Google Docs。需要的另一个功能是下载到Microsoft Word格式。
Any recommended ASP.Net built-in controls or samples/documents?
任何推荐的ASP.Net内置控件或样本/文档?
thanks in advance, George
乔治,提前谢谢
2 个解决方案
#1
3
What about FCKeditor? It is not built in but it is one of the most capable editor.
FCKeditor怎么样?它不是内置的,但它是最有能力的编辑之一。
You can get HTML from fckeditor control instance's Value property:
您可以从fckeditor控件实例的Value属性中获取HTML:
string s = fckeditor1.Value
Now save this string to a file say, MyPage.html. Now create an instance of MS World application and open this html file (myPage.html) with that application instance. Once opened you can save this opened file as word document! But this requires that you have MS office installed on machine:
现在将此字符串保存到文件中,例如MyPage.html。现在创建一个MS World应用程序的实例,并使用该应用程序实例打开此html文件(myPage.html)。打开后,您可以将此打开的文件保存为word文档!但这需要您在机器上安装MS Office:
private Word.ApplicationClass wordApp = new Word.ApplicationClass();
object fileName = ""; //Path to HTML File
object newFile = ""; //Path where you want to save doc file
bject missing = System.Reflection.Missing.Value;
Word.Document htmlDoc = WordApp.Documents.Open(ref fileName, ref missing,
ref readOnly, ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref missing, ref isVisible);
object docFormat = Microsoft.Office.Interop.Word.WdSaveFormat.wdFormatDocument;
//Please check if this is correct value from enumeration
htmlDoc.SaveAs(ref newFile,ref docFormat, ref missing,ref missing,ref missing,
ref missing,ref missing,ref missing, ref missing,ref missing,ref missing,
ref missing,ref missing,ref missing, ref missing,ref missing);
htmlDoc.Close();
wordApp.Quit();
PS:- It has been long time worked with this please don't mind if you have to do bit of work before using this code and method.
PS: - 这已经很长时间了,请不要介意在使用此代码和方法之前必须做一些工作。
#2
2
What about HTMl editor in Ajax Control toolkit. You can then get the content and save it as wod document. This thread has 2 links which had details about how to control HTML to word.
那么Ajax Control工具包中的HTMl编辑器呢。然后,您可以获取内容并将其另存为wod文档。该主题有2个链接,其中包含有关如何将HTML控制为单词的详细信息。
#1
3
What about FCKeditor? It is not built in but it is one of the most capable editor.
FCKeditor怎么样?它不是内置的,但它是最有能力的编辑之一。
You can get HTML from fckeditor control instance's Value property:
您可以从fckeditor控件实例的Value属性中获取HTML:
string s = fckeditor1.Value
Now save this string to a file say, MyPage.html. Now create an instance of MS World application and open this html file (myPage.html) with that application instance. Once opened you can save this opened file as word document! But this requires that you have MS office installed on machine:
现在将此字符串保存到文件中,例如MyPage.html。现在创建一个MS World应用程序的实例,并使用该应用程序实例打开此html文件(myPage.html)。打开后,您可以将此打开的文件保存为word文档!但这需要您在机器上安装MS Office:
private Word.ApplicationClass wordApp = new Word.ApplicationClass();
object fileName = ""; //Path to HTML File
object newFile = ""; //Path where you want to save doc file
bject missing = System.Reflection.Missing.Value;
Word.Document htmlDoc = WordApp.Documents.Open(ref fileName, ref missing,
ref readOnly, ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref missing, ref isVisible);
object docFormat = Microsoft.Office.Interop.Word.WdSaveFormat.wdFormatDocument;
//Please check if this is correct value from enumeration
htmlDoc.SaveAs(ref newFile,ref docFormat, ref missing,ref missing,ref missing,
ref missing,ref missing,ref missing, ref missing,ref missing,ref missing,
ref missing,ref missing,ref missing, ref missing,ref missing);
htmlDoc.Close();
wordApp.Quit();
PS:- It has been long time worked with this please don't mind if you have to do bit of work before using this code and method.
PS: - 这已经很长时间了,请不要介意在使用此代码和方法之前必须做一些工作。
#2
2
What about HTMl editor in Ajax Control toolkit. You can then get the content and save it as wod document. This thread has 2 links which had details about how to control HTML to word.
那么Ajax Control工具包中的HTMl编辑器呢。然后,您可以获取内容并将其另存为wod文档。该主题有2个链接,其中包含有关如何将HTML控制为单词的详细信息。