public final class WysiwygUtils
extends java.lang.Object
| Modifier and Type | Method and Description | 
|---|---|
static com.fasterxml.jackson.databind.ObjectMapper | 
getObjectMapper()
Returns the ObjectMapper. 
 | 
static javax.script.ScriptEngine | 
getScriptEngine()
Returns the ScriptEngine. 
 | 
static java.lang.String | 
getWysiwygMatchedLanguage(java.lang.String lang)
Returns the WYSIWYG language from the JCMS language. 
 | 
static boolean | 
isAutoConvertWiki2Wysiwyg(javax.servlet.http.HttpServletRequest request)
Checks if the wiki fields must be converted automatically to wysiwyg fields. 
 | 
static java.lang.Object | 
loadScript(javax.script.ScriptEngine engine,
          java.lang.String resource)
Loads a script resource. 
 | 
public static java.lang.String getWysiwygMatchedLanguage(java.lang.String lang)
lang - JCMS languagepublic static javax.script.ScriptEngine getScriptEngine()
ScriptEnginepublic static java.lang.Object loadScript(javax.script.ScriptEngine engine,
                                          java.lang.String resource)
                                   throws javax.script.ScriptException,
                                          java.io.IOException
engine - the ScriptEngine to use for evaluation of the specified scriptresource - resource to loadjavax.script.ScriptException - if error occurs in scriptjava.io.IOException - if error occurs when we read the resource as Stringpublic static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
ObjectMapperpublic static boolean isAutoConvertWiki2Wysiwyg(javax.servlet.http.HttpServletRequest request)
 The wiki fields are converted automatically to wysiwyg fields if the given request has the parameter
 WysiwygConstants.AUTO_CONVERT_WIKI_2_WYSIWYG or the property 'wiki.auto-convert-to-wysiwyg' is true.
request - HttpServletRequesttrue if the wiki fields are converted to wysiwyg fields, false insteadCopyright © 2001-2018 Jalios SA. All Rights Reserved.