Class EditorBbcodeService

    • Constructor Detail

      • EditorBbcodeService

        public EditorBbcodeService()
    • Method Detail

      • parse

        public String parse​(String strValue)
        Parse BBCODE text and return safe HTML This method clean a body fragment of HTML with Safelist.basicWithImages()
        Specified by:
        parse in interface IEditorBbcodeService
        Parameters:
        strValue - the value of the text
        Returns:
        HTML Text
      • parseAndClean

        public String parseAndClean​(String strValue,
                                    org.jsoup.safety.Safelist safelist)
        Parses the input string using BBCodeUtil.parse() and cleans the resulting HTML using Jsoup.clean() with the specified Safelist, and returns the cleaned string.
        Specified by:
        parseAndClean in interface IEditorBbcodeService
        Parameters:
        strValue - the input string to be parsed and cleaned
        safelist - the Safelist to be used for cleaning the HTML
        Returns:
        the cleaned and sanitized string
      • getInstance

        public static EditorBbcodeService getInstance()
        Returns the unique instance of the service
        Returns:
        The instance of the service
      • init

        public void init()
        Init service