Registering an Editor Component for my HUGO Shortcode

Hi I am a creating an Editor Component for HUGO Shortcode.
here is the code but it doesn’t work. please help me fix. I am a newbie…



        id: "product1"

        label: "Product Preview Type 1"

        fields: [

            {name: 'title', label: 'Title Like Editors Choice', widget: 'string'},

            {name: 'amzimg', label: 'Product Image Code', widget: 'string'},

            {name: 'amzlink', label: 'AMZ Link', widget: 'string'},


        fromBlock: function(match) {

          return {

            title: match[1],

            amzimg: match[2],

            amzlink: match[3],



        toBlock: function(title, amzimg, amzlink) {

          return (

            '{{<product1 title="'+ title +'" img="'+ amzimg +'">}}' + amzlink + '{{</product1>}}'





Please check the code if there are any problem!

Hi there! Thanks for your interest in Netlify CMS. Looks like you posted your question a little while ago, but that you haven’t received a solution yet. Here’s where you might get more help: - the site houses our extensive documentation that likely contains helpful information to get you back on track.

netlify cms slack - join our friendly slack channel and chat with other cms pros to get the help you need.

GitHub Issues - think you’ve found a bug, or would like to make a feature request? Make your voice heard here. Netlify CMS is open source - PRs and other contributions are also welcome!

Stack Overflow Check StackOverflow for questions tagged “Netlify CMS” if you don’t get an answer in the Slack or the GH issues. StackOverflow reaches a worldwide audience of knowledgeable people.

Your question will be left open here for anyone to comment - but we encourage you to check out the above resources if you are still looking for a solution!