Class HtmlEmbedApp

java.lang.Object
sk.iway.iwcm.components.WebjetComponentAbstract
sk.iway.iwcm.components.apphtmlembed.HtmlEmbedApp
All Implemented Interfaces:
WebjetComponentInterface

public class HtmlEmbedApp extends WebjetComponentAbstract
  • Constructor Details

    • HtmlEmbedApp

      public HtmlEmbedApp()
  • Method Details

    • getPreviewHtmlCode

      public static String getPreviewHtmlCode(String htmlCode, boolean previewMode)
      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 code
      previewMode - true when rendering the editor component preview
      Returns:
      HTML to render
    • isScriptOnly

      public static boolean isScriptOnly(String htmlCode)
      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

      public String getHtml()
    • setHtml

      public void setHtml(String html)