Element element = textArea.getElement();
DOM.setStyleAttribute(element, "font", fontValue);
DOM.setStyleAttribute(element, "fontSize", sizeValue);
Is thr any way i could hightlight a selected text inside textarea with
some color?
I am getting following exception while changing the font family.
[ERROR] Uncaught exception escaped
java.lang.RuntimeException: JavaScript method
'@com.google.gwt.user.client.impl.DOMImpl::setStyleAttribute(Lcom/google/gwt/user/client/Element;Ljava/lang/String;Ljava/lang/String;)'
threw an exception
at
com.google.gwt.dev.shell.ie.ModuleSpaceIE6.invokeNative(ModuleSpaceIE6.java:394)
at
com.google.gwt.dev.shell.ie.ModuleSpaceIE6.invokeNativeVoid(ModuleSpaceIE6.java:283)
at
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:127)
at
com.google.gwt.user.client.impl.DOMImpl.setStyleAttribute(DOMImpl.java:257)
at com.google.gwt.user.client.DOM.setStyleAttribute(DOM.java:816)
at
com.veetech.gwt.client.RichtextEditor$1.onChange(RichtextEditor.java:57)
at
com.google.gwt.user.client.ui.ChangeListenerCollection.fireChange(ChangeListenerCollection.java:36)
at
com.google.gwt.user.client.ui.ListBox.onBrowserEvent(ListBox.java:152)
at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:902)
at com.google.gwt.user.client.DOM.dispatchEventAndCatch(DOM.java:886)
at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:854)
at
com.google.gwt.dev.shell.StaticJavaDispatch.callMethod(StaticJavaDispatch.java:45)
Caused by: com.google.gwt.core.client.JavaScriptException: JavaScript
Error exception: Invalid argument.
at
com.google.gwt.dev.shell.ModuleSpace.createJavaScriptException(ModuleSpace.java:267)
at
com.google.gwt.dev.shell.ie.ModuleSpaceIE6.exceptionCaught(ModuleSpaceIE6.java:105)
at
com.google.gwt.dev.shell.JavaScriptHost.exceptionCaught(JavaScriptHost.java:31)
at
com.google.gwt.dev.shell.StaticJavaDispatch.callMethod(StaticJavaDispatch.java:45)
at
com.google.gwt.dev.shell.ie.IDispatchProxy.invoke(IDispatchProxy.java:127)
at
com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke(IDispatchImpl.java:199)
at
com.google.gwt.dev.shell.ie.IDispatchImpl.method6(IDispatchImpl.java:108)
at
org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:117)
at
org.eclipse.swt.internal.ole.win32.IDispatch.Invoke(IDispatch.java:64)
at
org.eclipse.swt.ole.win32.OleAutomation.invoke(OleAutomation.java:487)
Intead of font i replaced fontFamily "DOM.setStyleAttribute(element,
"font", fontValue); " its work but text area is been resizing.
Is thr any way i could hightlight a selected text inside textarea with
some color pelette?