Interface Preview

All Superinterfaces:
org.timepedia.exporter.client.Exportable

public interface Preview extends org.timepedia.exporter.client.Exportable
FirstSpirit WebEdit Javascript Preview API, accessible via
    WE_API.Preview

Examples:
WE_API.Preview.reload();   // reloads the current page
Since:
5.0.106
  • Method Details

    • reload

      void reload()
      Reloads the current page.
      Since:
      5.0.106
    • reload

      void reload(@Nullable @Nullable com.google.gwt.dom.client.Element element)
      Reloads the given element. The nearest surrounding editor identifier will influence whether or not the preview will be reloaded partly.
      Parameters:
      element - element to reload.
      Since:
      5.0.106
    • reload

      void reload(@NotNull @NotNull String htmlId)
      Reloads the element with the given id.
      Parameters:
      htmlId - the id of the element to reload.
      Since:
      5.2.26
    • addElementReloadListener

      void addElementReloadListener(Preview.ElementReloadListener listener)

      Registers a listener for events about reloaded elements in the current preview document.

      Listener registration in JavaScript might look like:
      ...addElementReloadListener(function(element){...});

      Parameters:
      listener - listener to inform
      Since:
      5.1.37
    • rescan

      void rescan(@Nullable @Nullable com.google.gwt.dom.client.Element element)
      Searches in the specified element for new editor identifiers.
      Parameters:
      element - element to scan for editor identifiers.
      Since:
      5.1.37
    • repaint

      void repaint()
      Repaints the editor highlighting.
      Since:
      5.1.38
    • getWindow

      @Nullable @Nullable com.google.gwt.core.client.JavaScriptObject getWindow()
      Returns a reference to the current window object of the preview frame.
      Returns:
      window, or null if currently not available
      Since:
      5.1.302
    • highlight

      @Internal void highlight(@Nullable @Nullable String text)
      [Hidden] Highlights the given text.
      Parameters:
      text - to highlight or null to remove the highlighting.
    • isParameterized

      @Deprecated boolean isParameterized()
      Deprecated.
      since 5.2, use MPPWebControl.isParameterized() instead
      Returns whether or not the current preview parametrization is enabled by the user.
      Returns:
      true if preview has parameter, false otherwise.
      Since:
      5.1.30
    • getParameter

      @Nullable @Deprecated @Nullable Object getParameter(String name)
      Deprecated.
      since 5.2, use MPPWebControl.getParameter(String) instead
      Returns the current value of the specified preview parameter.
      Parameters:
      name - name of the preview parameter to get the value for.
      Returns:
      parameter value, or null
      Since:
      5.1.30
    • setParameter

      @Deprecated void setParameter(String name, @Nullable @Nullable Object value)
      Deprecated.
      Sets the current value of the specified preview parameter.
      Parameters:
      name - name of the preview parameter to set the value for.
      value - parameter value, or null
      Since:
      5.1.30
    • getTimeParameter

      @Nullable @Deprecated @Nullable com.google.gwt.core.client.JavaScriptObject getTimeParameter()
      Deprecated.
      since 5.2, use MPPWebControl.getTimeParameter() instead
      Returns the current time the user has chosen using the preview timeline.
      Returns:
      the current time (as javascript Date) object, or null
      Since:
      5.1.30
    • setTimeParameter

      @Deprecated void setTimeParameter(com.google.gwt.core.client.JavaScriptObject date)
      Deprecated.
      Set the time that should be used for preview.
      Parameters:
      date - the time (as javascript Date) object, or null
      Since:
      5.1.30