public class WysiwygMediasRewriter
extends java.lang.Object
html = WysiwygMediasRewriter.rewriteMedias(html)
It is invoked automatically by WysiwygRenderer
through
<jalios:wysiwyg> tag, if the following property was defined :
wysiwyg.medias-rewrite.enabled: true
Constructor and Description |
---|
WysiwygMediasRewriter() |
Modifier and Type | Method and Description |
---|---|
static boolean |
canRewrite()
Check if the current context information required to rewrite
a media are available.
|
static java.lang.String |
renderMedia(java.lang.String mediaSource,
int maxWidth,
int maxHeight)
Render the specified media path using the appropriate MediaTag template .
|
static java.lang.String |
rewriteMedias(java.lang.String html)
Find all the "object" tags in the specified html and replace
them with a rendering performed by the MediaTag.
|
public static java.lang.String rewriteMedias(java.lang.String html)
html
- the HTML fragment to be modifiedpublic static boolean canRewrite()
Depending on the implementation (Tomcat or JspEngine), the requirements may not be the same (current request available, ...).
public static java.lang.String renderMedia(java.lang.String mediaSource, int maxWidth, int maxHeight)
mediaSource
- the source of the media : an id, an URL, or a path relative to the webappmaxWidth
- a maximum width, value is ignored if equals or lower than 0maxHeight
- a maximum height, value is ignored if equals or lower than 0Copyright © 2001-2018 Jalios SA. All Rights Reserved.