File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ export default function save({ attributes }) {
1717 return deprecatedRenderIconV1 ( attributes , { extraProps } )
1818}
1919
20- function deprecatedRenderIconV1 ( attributes , options = { } ) {
20+ export function deprecatedRenderIconV1 ( attributes , options = { } ) {
2121 const { wrapperProps = { } , classNamesByLayer } = options ?. extraProps || { }
2222 const elementType = options ?. wrapperElement ?. toLowerCase ( ) || 'div'
2323 const iconLayers = attributes ?. iconLayers
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import { renderIconForEditor } from './rendering'
1313import IconModifier from './iconModifier'
1414import { ANIMATIONS , FONT_AWESOME_COMMON_BLOCK_WRAPPER_CLASS } from './constants'
1515import { toIconDefinition } from './iconDefinitions'
16+ import { deprecatedRenderIconV1 } from './deprecated/deprecatedSaveV1'
1617export const ZERO_WIDTH_SPACE = '\u200b'
1718const FONT_AWESOME_RICH_TEXT_ICON_CLASS = 'wp-rich-text-font-awesome-icon'
1819const FONT_AWESOME_RICH_TEXT_ICON_TRANSFORM_ATTR = 'data-transform'
@@ -237,13 +238,13 @@ function Edit(props) {
237238 }
238239
239240 const changeValue = ( attributes ) => {
240- const blockProps = {
241+ const wrapperProps = {
241242 className : classnames ( FONT_AWESOME_RICH_TEXT_ICON_CLASS , FONT_AWESOME_COMMON_BLOCK_WRAPPER_CLASS )
242243 }
243244
244- const element = renderIconForEditor ( attributes , {
245- blockWrapperTag : 'span' ,
246- blockProps
245+ const element = deprecatedRenderIconV1 ( attributes , {
246+ wrapperElement : 'span' ,
247+ extraProps : { wrapperProps }
247248 } )
248249
249250 const html = renderToString ( element )
You can’t perform that action at this time.
0 commit comments