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
Examples:
WE_API.Preview
Examples:
WE_API.Preview.reload(); // reloads the current page- Since:
- 5.0.106
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceListener for events about reloaded elements in the preview document. -
Method Summary
Modifier and TypeMethodDescriptionvoidRegisters a listener for events about reloaded elements in the current preview document.@Nullable ObjectgetParameter(String name) Deprecated.@Nullable com.google.gwt.core.client.JavaScriptObjectDeprecated.since 5.2, useMPPWebControl.getTimeParameter()instead@Nullable com.google.gwt.core.client.JavaScriptObjectReturns a reference to the current window object of the preview frame.void[Hidden] Highlights the giventext.booleanDeprecated.since 5.2, useMPPWebControl.isParameterized()insteadvoidreload()Reloads the current page.voidReloads the element with the given id.voidreload(@Nullable com.google.gwt.dom.client.Element element) Reloads the given element.voidrepaint()Repaints the editor highlighting.voidrescan(@Nullable com.google.gwt.dom.client.Element element) Searches in the specified element for new editor identifiers.voidsetParameter(String name, @Nullable Object value) Deprecated.since 5.2, useMPPWebControl.setParameter(String, Object)insteadvoidsetTimeParameter(com.google.gwt.core.client.JavaScriptObject date) Deprecated.since 5.2, useMPPWebControl.setTimeParameter(Object)instead
-
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
Reloads the element with the given id.- Parameters:
htmlId- the id of the element to reload.- Since:
- 5.2.26
-
addElementReloadListener
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
nullif currently not available - Since:
- 5.1.302
-
highlight
[Hidden] Highlights the giventext.- Parameters:
text- to highlight ornullto remove the highlighting.
-
isParameterized
Deprecated.since 5.2, useMPPWebControl.isParameterized()insteadReturns whether or not the current preview parametrization is enabled by the user.- Returns:
trueif preview has parameter,falseotherwise.- Since:
- 5.1.30
-
getParameter
Deprecated.since 5.2, useMPPWebControl.getParameter(String)insteadReturns 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.since 5.2, useMPPWebControl.setParameter(String, Object)insteadSets the current value of the specified preview parameter.- Parameters:
name- name of the preview parameter to set the value for.value- parameter value, ornull- Since:
- 5.1.30
-
getTimeParameter
Deprecated.since 5.2, useMPPWebControl.getTimeParameter()insteadReturns the current time the user has chosen using the preview timeline.- Returns:
- the current time (as javascript
Date) object, ornull - Since:
- 5.1.30
-
setTimeParameter
Deprecated.since 5.2, useMPPWebControl.setTimeParameter(Object)insteadSet the time that should be used for preview.- Parameters:
date- the time (as javascriptDate) object, ornull- Since:
- 5.1.30
-
MPPWebControl.getParameter(String)instead