Skip to content

Instantly share code, notes, and snippets.

@itsdavidmorgan
Last active November 12, 2018 18:25
Show Gist options
  • Save itsdavidmorgan/0c0a95e26d958c60f745d523027d6c10 to your computer and use it in GitHub Desktop.
Save itsdavidmorgan/0c0a95e26d958c60f745d523027d6c10 to your computer and use it in GitHub Desktop.
Variables For Edit Function Of Custom Profile Block
edit: function (props) {
var attributes = props.attributes
var alignment = props.attributes.alignment
var facebookURL = props.attributes.facebookURL
var twitterURL = props.attributes.twitterURL
var instagramURL = props.attributes.instagramURL
var linkedURL = props.attributes.linkedURL
var emailAddress = props.attributes.emailAddress
var onSelectImage = function (media) {
return props.setAttributes({
mediaURL: media.url,
mediaID: media.id
})
}
function onChangeAlignment (newAlignment) {
props.setAttributes({ alignment: newAlignment })
}
return [
// We build the editor interface of our block here.
]
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment