Hi All,
Is there any way I can set the Web HTML editor's read only property using javascript? I need this as in certain situations my Web HTML editor needs to be set to read only and I'd like to avoid any postbacks if possible?
Thanks,
Solved!I have solved with contentEditable == 'true'RegardsElio
Hello Maya, I whish that you can help me solving a issue that I got a few days ago.I have a javascript function that is used in all my pages, which basically keep blocked the backspace key for all the controls except when they have the isTexEdit attribute in true and readOnly in false.I am been trying to apply this function to my control ighedit:WebHtmlEditor ID="EditorHtml" but it doesn't work, because this control has the isTexEdit attribute undefined and readOnly in false, even when I can write text in this control.Do you know how could I block the backspace key for this control, just for prevent the navigation functionallity, except when I am positioned on the textarea, where the backspace key should work with normally?This is my js functiondocument.onkeydown = function () // IE { var tipoControl = event.srcElement; var codigoTecla = event.keyCode; return ((codigoTecla != 8) || (tipoControl.isTextEdit == true && tipoControl.readOnly == false) || (tipoControl == '[object HTMLDivElement]')); <!--I try with this line but it works partially, because I had more than one objects of this king in my page --> }I apreciate your helpRegardsElio
Hello Maya,
Thanks for the tip. I've had my dev priorities changed recently, so I did not have a chance yet to check this fix if it is working. You can close the support ticket for now, I'll log a new one if need be. However, it looks as if your recommendation will solve my problem.
Thanks for the help!!!!!!
Regards,
Eduard Kruger.
Hello Eduard ,
I’m just following up to see if you’ve been able to resolve your issue. If you have any questions or concerns or if you need further assistance please let me know.
Best Regards,
Maya Kirova
Developer Support Engineer
Infragistics, Inc.
http://es.infragistics.com/support
Thank you for posting in our forum.
You can get the editable area and set it to be disabled. In that case that area will be non-editable.
For example on the Initialize event of the WebHtmlEditor you can get the element and set it to be disabled:
function Init(oEditor) {
var elem = document.getElementById(oEditor.ID+'_tw');
elem.disabled = 'disabled';
}
Let me know if you have any questions or concerns.
Developer Support Engineer II