Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

Commit

Permalink
Improved doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
silviubogan committed Aug 17, 2020
1 parent 3d4f6fd commit 70969a2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/blocks/Text/extensions/withDeserializers.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { blockTagDeserializer } from 'volto-slate/editor/deserialize';
import { Editor } from 'slate';

/**
* This extension just replaces the `<h1>` tag deserializer with the one for `<h2>` tags. The rest of the default deserializers inherited from the `SlateEditor` component are good already.
* @param {Editor} editor The Slate editor object to extend.
*/
export const withDeserializers = (editor) => {
editor.htmlTagsToSlate = {
...editor.htmlTagsToSlate,
Expand Down

0 comments on commit 70969a2

Please sign in to comment.