Skip to content

Instantly share code, notes, and snippets.

Created November 6, 2020 09:37
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
[Custom but OOTB-like detailed block preview]
<button type="button" class="btn-reset umb-outline blockelement-labelblock-editor blockelement__draggable-element flex"
ng-click="api.editBlock(block, block.hideContentInOverlay, index, parentForm)"
ng-class="{ '--active':, '--error': parentForm.$invalid && valFormManager.isShowingValidation() }"
<i class="icon {{block.content.icon}}" aria-hidden="true"></i>
<span style="margin-left:8px;">
<!-- if the block is the image block, show the name of the image, and optionally the caption -->
<span ng-if="block.content.contentTypeAlias == 'imageBlock'">
{{ | ncNodeName }}
<small ng-if=" != ''">
<br />
{{ }}
<!-- if the block is a FAQ block - show the first question, and then how many other questions have been added -->
<span ng-if="block.content.contentTypeAlias == 'fAQ'">
{{ }}
<br />
<span ng-if=" && == 0">
No questions added
<span ng-if=" && > 0">
{{[0].question }}
<span ng-if=" && == 2">
and one other question
<span ng-if=" && > 2">
and {{ - 1 }} other questions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment