mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-25 12:34:45 -04:00
15 lines
477 B
TypeScript
15 lines
477 B
TypeScript
/*
|
|
* SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file)
|
|
*
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
*/
|
|
import { useApplicationState } from './use-application-state'
|
|
|
|
/**
|
|
* Extracts the markdown content of the current note from the global application state.
|
|
*
|
|
* @return The markdown content of the note
|
|
*/
|
|
export const useNoteMarkdownContent = (): string => {
|
|
return useApplicationState((state) => state.noteDetails?.markdownContent.plain ?? '')
|
|
}
|