Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Rich Text Editor - Read/write mode only

    Is there any way to set editor in read/write mode only..?

    #2
    Its possible, the underlying canvas which serves as the editor has an "editable" attribute. Once you've drawn your RichTextEditor do a getMembers() and look for the member with the id "editArea", from there you can setAttribute("editable", [true|false], true); on it. You can also use JSNI
    Code:
    public class MyRichTextEditor extends RichTextEditor {
      protected native void setReadOnly(boolean flag)/*-{
        var self = this.@com.smartgwt.client.widgets.BaseWidget::getOrCreateJsObj()();
        self.editArea.editable = flag;
      }-*/;
    }

    Comment

    Working...
    X