Class HtmlEmbedApp
java.lang.Object
sk.iway.iwcm.components.WebjetComponentAbstract
sk.iway.iwcm.components.apphtmlembed.HtmlEmbedApp
- All Implemented Interfaces:
WebjetComponentInterface
-
Field Summary
Fields inherited from class sk.iway.iwcm.components.WebjetComponentAbstract
appHideFields, cacheMinutes, device, EMPTY_PAGE, showForLoggedUser, wrapperAriaLabel, wrapperClass, wrapperId, wrapperTitle -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetHtml()static StringgetPreviewHtmlCode(String htmlCode, boolean previewMode) Returns escaped source code for script-only embeds in the component preview.static booleanisScriptOnly(String htmlCode) Checks whether the fragment contains only top-level script elements, whitespace and comments.voidMethods inherited from class sk.iway.iwcm.components.WebjetComponentAbstract
addCurrentValueToOptions, addCurrentValueToOptions, addOptions, buildWrapperDiv, getAppHideFields, getAppOptions, getBaseAppOptions, getCacheMinutes, getDevice, getShowForLoggedUser, getViewFolder, getWrapperAriaLabel, getWrapperClass, getWrapperId, getWrapperTitle, init, init, initAppEditor, isEditorPreview, parseOptionsFromConfig, setAppHideFields, setCacheMinutes, setDevice, setShowForLoggedUser, setViewFolder, setWrapperAriaLabel, setWrapperClass, setWrapperId, setWrapperTitle
-
Constructor Details
-
HtmlEmbedApp
public HtmlEmbedApp()
-
-
Method Details
-
getPreviewHtmlCode
Returns escaped source code for script-only embeds in the component preview. The original embed is returned in all other cases, including normal page rendering.- Parameters:
htmlCode- HTML embed source codepreviewMode- true when rendering the editor component preview- Returns:
- HTML to render
-
isScriptOnly
Checks whether the fragment contains only top-level script elements, whitespace and comments.- Parameters:
htmlCode- HTML embed source code- Returns:
- true when the fragment contains at least one script and no renderable HTML
-
getHtml
-
setHtml
-