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 in
SyntaxContent Editors.- Since:
- 8.2RC1
- Version:
- $Id: 1fe151448775b2eed3d5e49035e04c8e162416bd $
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.xwiki.edit.script.AbstractTypedEditScriptService
getDataType, getDefaultEditor, getDefaultEditor, getDefaultEditorId, getDefaultEditorId, getEditor, getEditors, getEditors
-
Constructor Details
-
SyntaxContentEditScriptService
public SyntaxContentEditScriptService()
-
-
Method Details
-
getDefaultTextEditor
- Returns:
- the default
SyntaxContenteditor in the "Text" category
-
getDefaultWysiwygEditor
- Returns:
- the default
SyntaxContenteditor in the "WYSIWYG" category
-
text
public String text(String content, org.xwiki.rendering.syntax.Syntax syntax, Map<String, Object> parameters) throws EditExceptionGenerates 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 EditExceptionGenerates 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
-