Interface RawEditor
- All Superinterfaces:
Editor
Provides extensions with an instance of Burp Suite's HTTP text editor to use in their own user interface.
-
Method Summary
Modifier and TypeMethodDescriptionintbooleanThis will returnOptional.empty()if the user has not made a selection.voidsetCaretPosition(int position) Set the position of the caret within the current message editor.voidsetContents(ByteArray contents) This method can be used to set content within the text editor programmaticallyvoidsetEditable(boolean editable) voidsetSearchExpression(String expression) Update the search expression that is shown in the search bar below the editor.
-
Method Details
-
setEditable
void setEditable(boolean editable) - Parameters:
editable- Boolean flag to toggle if this text editor is editable or not.
-
getContents
ByteArray getContents()- Returns:
- The contents of the text editor.
-
setContents
This method can be used to set content within the text editor programmatically- Parameters:
contents- The content to set in the text editor.
-
setSearchExpression
Update the search expression that is shown in the search bar below the editor.- Specified by:
setSearchExpressionin interfaceEditor- Parameters:
expression- The search expression.
-
isModified
boolean isModified()- Specified by:
isModifiedin interfaceEditor- Returns:
- True if the user has modified the contents of the editor since the last time the content was set programmatically.
-
caretPosition
int caretPosition()- Specified by:
caretPositionin interfaceEditor- Returns:
- The index of the position for the carat within the current message editor.
-
setCaretPosition
void setCaretPosition(int position) Description copied from interface:EditorSet the position of the caret within the current message editor.- Specified by:
setCaretPositionin interfaceEditor- Parameters:
position- The index to set the caret position to.
-
selection
-
uiComponent
Component uiComponent()- Specified by:
uiComponentin interfaceEditor- Returns:
- UI component of the editor, for extensions to add to their own UI.
-