You are not logged in.
Pages: 1
Yo check out my first attempt at saving the contents of Xinha as a Word document.
Offline
Cool! Xinha doesn't seem too work in IE, though. I saw something once about how to create RTF files that made me think that Xinha could do it with some kind of RegEx plugin like GetHtml http://www.phpinsider.com/smarty-forum/ … php?t=2049 but this is much better.
I wonder if it's possible to support images.
Offline
The example just worked perfectly for me in IE, except the popup didn't close after I pressed the button.
Offline
I wouldn't know how to close that window. I am not much of a javascript-programmer, I just "saw the way" and grabbed some stuff together.
Images loaded into Xinha with the Image Manager work fine in Word I believe.
It would be nice if we could know which styles, if any, are loaded. Then we could copy them to the Word-document.
And it would be nice to know how to close the popup after we submitted the form and started the download
Offline
Actually, after playing around trying to find what the minimal changes required are to make an HTML file behave like a Word doc, I've found that I can change the extension on any HTML file to .doc, and then it opens in Word and lets me edit it. Fascinating.
Offline
This is the article in which I found the <head> I used.
Offline
iframe zoom is not working in firefox browser? Can anyone help?
Offline
overwrite is not working in firefox browser? Please help me?
Offline
images are displaying with absolute paths in firefox. can anyone help?
Offline
Ecco, I think it's great, are you going to create a plugin?
Offline
Subha, you should click on the Post New Topic link at the top of User Discussion & Help and create topics for your questions.
Then, someone familiar with your problem may see the name of your topic, read your question, and help you.
Offline
Using this code I'd hoped to be able to load Word documents into Xinha, but all I get is plain text. Perhaps someone could shed some light on this?
Xinha config :
xinha_config.URIs["Word"] = '/forum/word.html';
cfg.btnList["Word"] = [ "Open Word doc", "/forum/word.gif", true, function(e) { xinha_editors.myTextArea._popupDialog(xinha_config.URIs["Word"], null, null); } ];
cfg.toolbar.push(["Word"]);
word.html :
<html>
<head><title>Open Word document</title>
<script language="JavaScript">
<!--//
window.resizeTo(315, 170);
function loadworddoc(){
var doc = new ActiveXObject("Word.Application");
doc.Visible=false;
doc.Documents.Open(document.all.hello.value);
var txt;
txt = doc.Documents(document.all.hello.value).Content;
opener.xinha_editors.myTextArea.setHTML(txt);
doc.quit(0);
}
//-->
</script>
</head>
<body>
<p><font face=arial size=2>Open a Word-document</font>
<p><input type=file name=hello id="hello">
<p><input type=button onClick="loadworddoc();" value="Load">
</body>
</html>
Offline
My guess is that doc.Documents(document.all.hello.value).Content is returning plain text, you'd have to find the documentation of the Word ActiveX object and see if you can get it to return HTML which you can then insert.
James Sleeman
Offline
Pages: 1