public void show(final BLCRichTextItem richTextItem) {
   this.richTextItem = richTextItem;
   initItem(788, 580);
   setTitle("Edit " + richTextItem.getFieldName());
   String htmlValueToEdit = (String) richTextItem.getValue();
   toolBar.setHTML(htmlValueToEdit);
   show();
 }
  protected void initItem(int width, int height) {
    String legacyHtml = "";
    if (toolBar != null) {
      toolBar.removeFromParent();
    }
    if (textArea != null) {
      legacyHtml = textArea.getHTML();
      textArea.removeFromParent();
    }
    if (mainLayout != null) {
      removeItem(mainLayout);
      mainLayout.destroy();
    }
    textArea = new RichTextArea();
    toolBar = new RichTextToolbar(textArea, DisplayType.DETAILED);

    saveButton = new IButton(BLCMain.getMessageManager().getString("ok"));
    IButton cancelButton = new IButton(BLCMain.getMessageManager().getString("cancel"));
    cancelButton.addClickHandler(
        new ClickHandler() {
          @Override
          public void onClick(ClickEvent event) {
            hide();
          }
        });

    final HtmlEditingPresenter pp = HtmlEditingPresenter.getInstance();

    final HLayout buttonsLayout = new HLayout(10);
    buttonsLayout.setAlign(Alignment.CENTER);
    buttonsLayout.addMember(saveButton);
    buttonsLayout.addMember(cancelButton);
    buttonsLayout.setLayoutTopMargin(2);
    buttonsLayout.setLayoutBottomMargin(2);
    buttonsLayout.setWidth100();
    buttonsLayout.setHeight(25);

    mainLayout = new VLayout();
    mainLayout.setWidth100();
    mainLayout.setHeight100();

    toolBar.setHeight("60px");
    final VLayout toolbarLayout = new VLayout();
    toolbarLayout.setWidth100();
    toolbarLayout.setHeight(60);
    toolbarLayout.addMember(toolBar);

    int textHeight = height - 130;
    textArea.setHeight(textHeight + "px");
    textArea.setWidth(width + "px");
    final VLayout textAreaLayout = new VLayout();
    textAreaLayout.setWidth100();
    textAreaLayout.setHeight(textHeight);
    textAreaLayout.addMember(textArea);

    mainLayout.addMember(toolbarLayout);
    mainLayout.addMember(textAreaLayout);
    mainLayout.addMember(buttonsLayout);
    addItem(mainLayout);

    toolBar.addAssetHandler(
        new Command() {
          @Override
          public void execute() {
            pp.displayAssetSearchDialog(toolBar);
          }
        });

    textArea.setHTML(legacyHtml);

    saveButton.addClickHandler(
        new ClickHandler() {
          @Override
          public void onClick(ClickEvent event) {
            if (richTextItem != null) {
              richTextItem.setValue(toolBar.getHTML());
              richTextItem.getForm().fireEvent(new ItemChangedEvent(richTextItem.getJsObj()));
            }
            hide();
          }
        });
  }