Package org.patternfly.extension.codeeditor
package org.patternfly.extension.codeeditor
Provides the PatternFly code editor extension for displaying and editing code.
A code editor is a versatile text editor that supports displaying code with an optional header containing actions, tabs, and links. The editor can operate in read-only mode and supports custom actions such as copy-to-clipboard.
Key classes:
CodeEditor- the main code editor componentCodeEditorHeader- header area for actions and tabsCodeEditorAction- custom action button in the headerCodeEditorTab- tab in the header area
Usage
CodeEditor editor = codeEditor("System.out.println(\"Hello world\");")
.addHeader(codeEditorHeader()
.addAction(codeEditorCopyToClipboardAction()));
- See Also:
-
ClassesClassDescriptionA code editor is a versatile text editor that allows for editing various languages.An action button in the
CodeEditorheader, such as a copy-to-clipboard button.Container forCodeEditorActionbuttons in theCodeEditorheader.The header section of theCodeEditor, containing actions, links, and a tab.The main content area within theCodeEditorHeader.A link button in theCodeEditorheader, such as "View shortcuts".Container forCodeEditorLinkelements in theCodeEditorheader.A tab element in theCodeEditorheader, typically showing an icon and a language name.The icon displayed in aCodeEditorTab.The text label displayed in aCodeEditorTab.