moderator-toolbox-nxg-for-reddit / modules/config/components/WikiEditorTab

modules/config/components/WikiEditorTab

Functions

WikiEditorTab()

WikiEditorTab(__namedParameters): Element

Defined in: extension/data/modules/config/components/WikiEditorTab.tsx:101

Renders a CodeMirror (or plain textarea) editor pre-loaded with a subreddit wiki page, with save functionality and AutoModerator error display.

Parameters

__namedParameters

Props

Returns

Element

Interfaces

WikiEditorHistory

Defined in: extension/data/modules/config/components/WikiEditorTab.tsx:48

Imperative wiki-history API the tab assigns into a ref so the footer’s rollback dropdown can drive it. Both functions target the page the editor is pointed at.

Properties

listRevisions

listRevisions: () => Promise<WikiRevision[]>

Defined in: extension/data/modules/config/components/WikiEditorTab.tsx:50

Lists the current page’s revision history, newest first.

Returns

Promise<WikiRevision[]>

loadRevision

loadRevision: (revision) => void

Defined in: extension/data/modules/config/components/WikiEditorTab.tsx:52

Loads one revision’s content into the editor (saving then restores it).

Parameters
revision

WikiRevision

Returns

void

Type Aliases

HistoryRef

HistoryRef = object

Defined in: extension/data/modules/config/components/WikiEditorTab.tsx:56

Ref-based slot for the wiki-history API shared between tab and footer.

Properties

current

current: WikiEditorHistory | null

Defined in: extension/data/modules/config/components/WikiEditorTab.tsx:56


WikiPage

WikiPage = "toolbox" | "usernotes" | "usernotesShard" | "automoderator"

Defined in: extension/data/modules/config/components/WikiEditorTab.tsx:41

The wiki page to load and edit in the editor. usernotesShard is one page of the sharded NXG usernotes layout; shard tabs must also pass the literal shard path via the literalPage prop.