Spoiler Plugin
Spoilers plugin allows the user to hide some content (text, image, gallery, video ) on the page. Spoiler for plugins done through plugin settings modal, and for text through text formatting toolbar.
For consume Spoiler you need to:
spoiler plugins
- add spoiler plugin to plugins array (described below).spoiler text
- add spoiler button to text formatting toolbar by add it to getToolbarSettings config. For more information click here or look at the example below.
Add content and spoiler it!
#
Usage#
Spoiler Editor Config APIsupportedPlugins
#
controls on which plugins spoiler can be done. If not given - spoiler can be don on all supported plugins
SpoilerEditorWrapper
#
Wrapper component which enables to override the default spoiler component that wrapping the plugins
#
Spoiler Viewer Config APIinitSpoilersContentState
#
Function that gets contentState and returns a new contentState with block after modify manipulation on spoiler block style
SpoilerViewerWrapper
#
Wrapper component which enables to override the default spoiler component that wrapping the plugins