Hi,
Is there a way to enable the select/copy functionality from a document that is displayed as "ReadOnly"? We do not want to give users the ability to edit the documents within our app, but they are free to copy and paste into something else if they like. I noticed that the "Copy" function works only if I "unprotect" the document.
Thanks for any suggestions.Dan
Hi Dan,
WebHtmlEditor has ReadOnly property, you may try it.
Viktor,
I am aware of that. As I said in my prior post: "I noticed that the "Copy" function works only if I "unprotect" the document."
So to be more specific, when the property is set to read only apparently the "Copy" function does not work. When it is not set to read only the "Copy" function works fine.
So the question is: Can the "Copy" function (button, etc) be made to work when the read only attribute is set to true?
Dan
function editorMouseDown(evt){ // verify that copy button was clicked if(!evt) return; var src = evt.srcElement; if(!src) src = evt.target; if(!src) return; if(src.nodeName != 'IMG' || src.src.indexOf('Copy.gif') < 0) return; // you may use document.execCommand('copy') or edit._format which is a short cut to it var edit = iged_getById('WebHtmlEditor1'); edit._format('copy');}var edit = iged_getById('WebHtmlEditor1');var elem = document.getElementById("<%=WebHtmlEditor1.ClientID%>");// or member _tb contains reference to toolbar table//var elem = edit._tb;// you may use your own add-event-handlers or _addLsnr shortcutedit._addLsnr(elem, "mousedown", editorMouseDown);