I also came into that problem... BTW there's already a setEnabled function that should work, but doesn't... I'll check issues and report that if it's not already.
Christian On Tue, Jan 12, 2010 at 11:13 AM, selezovikj <[email protected]>wrote: > > com.google.gwt.core.client.JavaScriptException: (TypeError): > iframe.contentWindow is null > > What do you think might be causing this null pointer exception ? > > On Jan 12, 1:23 pm, Manuel Carrasco Moñino <[email protected]> wrote: > > This method also works in IE > > > > private native void setEnabled(Element iframe, boolean b) /*-{ > > var doc = iframe.contentWindow.document; > > if (doc.body.contentEditable) > > doc.body.contentEditable = b; > > else > > doc.designMode = b ? 'On' : 'Off'; > > }-*/; > > > > On Tue, Jan 12, 2010 at 12:10 PM, Manuel Carrasco Moñino > > <[email protected]>wrote: > > > > > > > > > You can try setting on/off the iframe designMode attribute , something > like > > > this. > > > > > RichTextArea area = new RichTextArea(); > > > > > setEnabled(area.getElement(), false); > > > > > native void setEnabled(Element iframe, boolean b) /*-{ > > > iframe.contentWindow.document.designMode = b ? 'On' : 'Off'; > > > }-*/; > > > > > It works for ff and webkit, ie seems not working. > > > > > Regards > > > Manuel Carrasco Moñino > > > > > On Sun, Jan 3, 2010 at 6:05 AM, vacorda <[email protected]> > wrote: > > > > >> You can try something like this this: > > >> DOM.setElementPropertyBoolean(getElement(), "disabled", <true or > > >> false>); > > > > >> On Jan 2, 5:56 pm, Elchin <[email protected]> wrote: > > >> > One way would be catching all events, and redoing them, but that is > a > > >> > big time hassle, I wonder if there is any way to do it from DOM? > > > > >> > On Dec 16 2009, 6:28 pm, Elchin <[email protected]> wrote: > > > > >> > > Is there a way to makeRichTextArearead-only like > TextArea.setReadOnly > > >> > > (true)? > > >> > > What I need in my application is the possibility to edit the rich > text > > >> > > only by buttons in toolbar, and not through typing. > > > > >> -- > > > > >> You received this message because you are subscribed to the Google > Groups > > >> "Google Web Toolkit" group. > > >> To post to this group, send email to > [email protected]. > > >> To unsubscribe from this group, send email to > > >> [email protected]<google-web-toolkit%[email protected]><google-web-toolkit%2Bunsubs > [email protected]> > > >> . > > >> For more options, visit this group at > > >>http://groups.google.com/group/google-web-toolkit?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-web-toolkit%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > > > > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
