Package org.waveprotocol.wave.client.editor

Examples of org.waveprotocol.wave.client.editor.Editor


   *
   * @param editorDiv
   * @return div of editor's document
   */
  public static Element webdriverEditorGetDocDiv(Element editorDiv) {
    Editor editor = getByEditorDiv(editorDiv);
    return editor.getDocumentHtmlElement();
  }
View Full Code Here


  /**
   * @param editorDiv editor
   * @param content content to set
   */
  public static void webdriverEditorSetContent(Element editorDiv, String content) {
    Editor editor = getByEditorDiv(editorDiv);
    if (editor != null) {
      Preconditions.checkNotNull(documentSchema, "documentSchema is not set");
      editor.setContent(DocProviders.POJO.parse(content).asOperation(), documentSchema);
    }
  }
View Full Code Here

  /**
   * @param editorDiv
   * @return local content of editor owning doc div
   */
  public static String webdriverEditorGetLocalContent(Element editorDiv) {
    Editor editor = getByEditorDiv(editorDiv);
    if (editor != null) {
      // This must not be called synchronously in the same key event before
      // the dom is modified.
      EditorTestingUtil.forceFlush(editor);
      return XmlStringBuilder.innerXml(editor.getContent().getFullContentView()).toString();
    } else {
      return "Error in webdriverEditorGetLocalContent";
    }
  }
View Full Code Here

      editor.removeContent();
      editor.reset();
      // TODO(user): this does not work if the view has been deleted and
      // detached.
      editing.getMeta().deselect(MenuOption.EDIT);
      Editor oldEditor = editor;
      BlipView oldEditing = editing;
      editor = null;
      editing = null;
      fireOnSessionEnd(oldEditor, oldEditing);
    }
View Full Code Here

   */
  public static Editor getMinimalEditor() {
    registerHandlers(Editor.ROOT_REGISTRIES);

    EditorStaticDeps.setPopupProvider(Popup.LIGHTWEIGHT_POPUP_PROVIDER);
    Editor editor = Editors.create();
    editor.init(Editor.ROOT_REGISTRIES, KeyBindingRegistry.NONE, EditorSettings.DEFAULT);
    editor.setEditing(true);
    return editor;
  }
View Full Code Here

              return element.setAutoAppendContainer(Document.get().createElement(tag));
            }
          });
    }
    doc.setRegistries(registries);
    Editor editor = getMinimalEditor();
    editor.setContent(doc);
    return doc;
  }
View Full Code Here

TOP

Related Classes of org.waveprotocol.wave.client.editor.Editor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.