Making Word document embedded in a web page editable or read-only - ms-word

I'm embedding some Word documents into our web page using iframe like this:
<iframe src="ftp://ftp.example.com/www/uploads/Image/test.doc" width="100%" height="400">
Alternative
</iframe>
The problem is that the embedded Word control allows the user to edit the documents and shows an icon to save them, but doesn't actually save anything. Is it possible to setup Word to save edits back to the FTP server? If not, is there someway we can make the document read-only so the user doesn't get the idea that they can make changes? We're using IE7 and Word 2003.
(I just asked a related question about getting Word to save to a FTP server: Possible for Word to edit documents directly off an web server without Sharepoint?)

You can use ActiveX component like EDraw OfficeView or UltraOffice to embbed office and give you few control against the save and edit the document. You can also send it back to server for save.

There are a number of solutions to your problem, the easiest in my oppinion is a commercial app: https://crocodoc.com/. Developers have unlimited preview time but production use requires a license, don't know if thats an option in your case? To get this working in IE7 you will also need http://html5boilerplate.com/ together with http://code.google.com/p/html5shiv/.
Not sure if this solution will remain free but it is at the moment: https://cloudconvert.org/page/api. They provide an api to convert documents to html, you could write a script to convert docs to html on upload and then store html to show on site.
Another good option is http://www.phpdocx.com/ they have a conversion plugin to convert docx to HTML, pdf and such.
As for making your existing solution read only, i read somewhere you can do it with the method below but i am unable to test as i am on a mac and currently have no access to a machine with IE right now.
<object id="msword" width="100%" height="100%" classid="clsid:67F2A879-82D5-4A6D-8CC5-FFB3C114B69D" data='[insert document name].doc'>
<PARAM NAME="src" VALUE="file:////[insert full document path here].doc" >
<PARAM NAME="readonly" value=true>
</object>
Hope these suggestions help you with your project!

I would recommend converting the file to an mht file. this will provide cleaner lines when shown in the browser and prevent the user from editing or saving the file.

Related

Live manipulation to a Localhost Webpage or a Local Html File in Flutter

How can I show a HTML+CSS file in a Flutter widget, while being able to manipulate the HTML or CSS (in file) and viewing the changes live?
Manipulating HTML:
I could use JavaScript to manipulate the HTML DOM of a loaded webpage, probably through localhost? Is there a better way to do it instead?
Manipulating CSS:
Searching around the internet I find JavaScript like "dom.getElementById('something').style.color = color.red". Though, how could I go for loading css on every change of the css file, if possible?
I hope my question is not vague. Please let me know of any issues or suggestions on this question.
The app is meant for desktop installs, though I wouldn't mind switching to working with flutter-web if need be.
Kind regards.

Get HTML Equivalent of Google Doc contents

I am trying to get the HTML for a Google Doc's contents. The methods I have found all seem to use deprecated items. I ultimately want to use the Doc as a template for an email. I have everything working except getting the HTML version of the text. Yes, I want the full HTML version including tables, images, and anything else I can place in the Doc.
Is there any way to get this?
Regards,
Karl S
I believe the following method works:
Open up the Google Doc you want to work with
Click File-->Publish to the web
Click Link and then Publish
Copy the link into another tab
View the source for the page and copy everything inside and including <div id="contents">
This should be the complete HTML for that document. I just verified that it works with a document of mine. Let me know if it doesn't.

Editing Word Documents from Web Server

I have looked for a solution to this but all I have found are products that are close but not what I need.
We have a program that creates a word document on the fly based on data from our database, and stores it on our server, then the user can download this file to print,email,file away.
I need something that will allow the user to open the existing document from the server, edit it, and save it back to the server.
I need this to be able to work on all browser, so activex isn't a full solution.
This link is a proof of concept of using CKEditor to do what you describe.
The focus is on ensuring that the "long tail" of possible docx content is preserved across the editing process.
For example, take a look at the Microsoft demo docx, which they use to compare their web apps with Google Docs, at
google-documents-vs-word-web-app

is there any way to output the html from google chrome developer tools?

I have a website that uses javascript to change the HTML dynamically based on input. I use google developer tools to examine the HTML at any particular moment in the lifetime of the page. Is there any way easy way to output the HTML from the elements tab to a file or to the clipboard (so that I can run it thru a validator for debugging)? Control + A does not allow me to select all of the HTML.
You can Copy the <html> element as HTML:
... but you can do this easier at the console:
copy(document.documentElement.outerHTML);
Note that neither of these will copy the doctype. Also this is the serialization of the live DOM which could be totally different than the markup you served. But you know that.

How to edit content more easily?

i add content to my confluence page like a html
inside {html} tags. This page will be changed in future every week. It very difficult to understand html so quick for people who never don't work with html.
Is there any way in confluence to add a simple user interface form which helps to edit information inside html?
I know that confluence have embedded jQuery can anybody give advice how to do it better?
Thanks
Use the scaffolding plugin to Show only some special text fields for editing. Then you can hide the HTML code. But scaffolding is not ready for Confluence 4
http://wiki.customware.net/repository/display/AtlassianPlugins/Scaffolding+Plugin
You could download the page with Atlassian CLI, and parse out the section of html you want to modify, put that in your wysiwyg, and then inject it back into the downloaded html and post it back.
Of course it is as fun as it sounds.
An example of the content would help to answer this question.
One option is to put your content in a word .doc file, save it, upload it to the page. Use the office connector macro to display the content of the .doc on the page. The office connector plugin is free.
Note that Confluence V5 editor now has a basic set of editing features found in Microsoft Word.