Skip to content

Commit

Permalink
#3081: Save mandatory unstyled blocks as mandatory
Browse files Browse the repository at this point in the history
This makes sure that if an unstyled block has the mandatory class,
it is also being saved as a html element with the mandatory class.
  • Loading branch information
maradragan committed Jun 30, 2020
1 parent 7807258 commit ca227c1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions client/src/components/RichTextEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,13 @@ const exporterConfig = {
}
}

if (block.type === BLOCK_TYPE.UNSTYLED && block.data.mandatory) {
return {
start: '<p class="mandatory">',
end: "</p>"
}
}

if (block.type === BLOCK_TYPE.BLOCKQUOTE) {
return <blockquote />
}
Expand Down

0 comments on commit ca227c1

Please sign in to comment.