UNPKG

substance

Version:

Substance is a JavaScript library for web-based content editing. It provides building blocks for realizing custom text editors and web-based publishing systems.

21 lines (16 loc) 427 B
import { Command } from '../../ui' class ToggleFindAndReplaceCommand extends Command { getCommandState() { return { disabled: false } } execute({editorSession}) { let findAndReplaceManager = editorSession.getManager('find-and-replace') let surface = editorSession.getFocusedSurface() if (surface) { findAndReplaceManager.enable() } } } export default ToggleFindAndReplaceCommand