Package org.xwiki.edit.script
Class SyntaxContentEditScriptService
- java.lang.Object
-
- org.xwiki.edit.script.AbstractTypedEditScriptService<org.xwiki.rendering.syntax.SyntaxContent>
-
- org.xwiki.edit.script.SyntaxContentEditScriptService
-
- All Implemented Interfaces:
org.xwiki.script.service.ScriptService
@Component @Singleton @Named("edit.syntaxContent") public class SyntaxContentEditScriptService extends AbstractTypedEditScriptService<org.xwiki.rendering.syntax.SyntaxContent>
Edit script service specialized inSyntaxContent
Editor
s.- Since:
- 8.2RC1
- Version:
- $Id: 1fe151448775b2eed3d5e49035e04c8e162416bd $
-
-
Constructor Summary
Constructors Constructor Description SyntaxContentEditScriptService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Editor<org.xwiki.rendering.syntax.SyntaxContent>
getDefaultTextEditor()
Editor<org.xwiki.rendering.syntax.SyntaxContent>
getDefaultWysiwygEditor()
String
text(String content, org.xwiki.rendering.syntax.Syntax syntax, Map<String,Object> parameters)
Generates the HTML code needed to edit the given data.String
wysiwyg(String content, org.xwiki.rendering.syntax.Syntax syntax, Map<String,Object> parameters)
Generates the HTML code needed to edit the given data.-
Methods inherited from class org.xwiki.edit.script.AbstractTypedEditScriptService
getDataType, getDefaultEditor, getDefaultEditor, getDefaultEditorId, getDefaultEditorId, getEditor, getEditors, getEditors
-
-
-
-
Method Detail
-
getDefaultTextEditor
public Editor<org.xwiki.rendering.syntax.SyntaxContent> getDefaultTextEditor()
- Returns:
- the default
SyntaxContent
editor in the "Text" category
-
getDefaultWysiwygEditor
public Editor<org.xwiki.rendering.syntax.SyntaxContent> getDefaultWysiwygEditor()
- Returns:
- the default
SyntaxContent
editor in the "WYSIWYG" category
-
text
public String text(String content, org.xwiki.rendering.syntax.Syntax syntax, Map<String,Object> parameters) throws EditException
Generates the HTML code needed to edit the given data.- Parameters:
content
- the text content to editsyntax
- the syntax of the given contentparameters
- the edit parameters- Returns:
- the HTML code that displays the default text editor for
SyntaxContent
- Throws:
EditException
- if rendering the editor fails
-
wysiwyg
public String wysiwyg(String content, org.xwiki.rendering.syntax.Syntax syntax, Map<String,Object> parameters) throws EditException
Generates the HTML code needed to edit the given data.- Parameters:
content
- the text content to editsyntax
- the syntax of the given contentparameters
- the edit parameters- Returns:
- the HTML code that displays the default WYSIWYG editor for
SyntaxContent
- Throws:
EditException
- if rendering the editor fails
-
-