File tree Expand file tree Collapse file tree 5 files changed +22
-1
lines changed
Expand file tree Collapse file tree 5 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import schema from './schema'
1515import metadata from './block.json'
1616import example from './example'
1717import deprecated from './deprecated'
18+ import substitute from './substitute'
1819
1920export const settings = {
2021 ...metadata ,
@@ -29,4 +30,5 @@ export const settings = {
2930 deprecated,
3031 edit,
3132 save,
33+ substitute,
3234}
Original file line number Diff line number Diff line change 1+ export const substitute = {
2+ from : 'stackable/count-up' ,
3+ to : 'core/paragraph' ,
4+ transform : oldAttributes => {
5+ return {
6+ fontSize : 'x-large' ,
7+ content : oldAttributes . text ,
8+ align : oldAttributes . contentAlign ,
9+ }
10+ } ,
11+ }
12+
13+ export default substitute
Original file line number Diff line number Diff line change @@ -3,7 +3,10 @@ export const substitute = {
33 to : 'core/image' ,
44 transform : oldAttributes => {
55 if ( oldAttributes ) {
6- return { height : oldAttributes . imageHeight }
6+ return {
7+ height : oldAttributes . imageHeight ,
8+ url : oldAttributes . imageUrl ,
9+ }
710 }
811 } ,
912}
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ export const substitute = {
88 }
99 return [ 'core/paragraph' , {
1010 fontSize : 'x-large' ,
11+ align : oldAttributes . contentAlign ,
1112 content,
1213 } ]
1314 } ,
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ export const substitute = {
33 to : 'core/paragraph' ,
44 transform : oldAttributes => {
55 return {
6+ fontSize : 'small' ,
7+ align : oldAttributes . contentAlign ,
68 content : oldAttributes . text ,
79 }
810 } ,
You can’t perform that action at this time.
0 commit comments