Skip to content

Commit fce2a3d

Browse files
committed
feat: replace credit text field with richtext field
1 parent 1ac426d commit fce2a3d

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

packages/volto-iframe-block/src/components/View.jsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import cx from 'classnames';
22
import React from 'react';
3+
import { serializeNodes } from '@plone/volto-slate/editor/render';
34

45
import { isValidUrl } from '@kitconcept/volto-iframe-block/helpers/isValidUrl';
56

@@ -29,7 +30,12 @@ const IframeView = (props) => {
2930
{data.description && (
3031
<div className="description">{data.description}</div>
3132
)}
32-
{data.credit && <div className="credit">Credit: {data.credit}</div>}
33+
{data.credit && (
34+
<div className="credit">
35+
Credit:{' '}
36+
<div dangerouslySetInnerHTML={{ __html: data.credit.data }} />
37+
</div>
38+
)}
3339
</figcaption>
3440
</figure>
3541
</div>

packages/volto-iframe-block/src/components/schema.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export const IframeBlockSchema = (props) => ({
8787
},
8888
credit: {
8989
title: 'Credit',
90-
widget: 'text',
90+
widget: 'richtext',
9191
},
9292
width: {
9393
title: props.intl.formatMessage(messages.Width),

0 commit comments

Comments
 (0)