code: function(){
        var dataObj = {};
  
        var content = this.getTextBlock().html();
        if (content.length > 0) {
          dataObj.text = SirTrevor.toMarkdown(content, this.type);
        }
  
        this.setData(dataObj);
      }
docs: Function; Executed on save of the block, once the block is validated toData expects a way for the block to be transformed from inputs into structured data The default toData function provides a pretty comprehensive way of turning data into JSON In this example we take the text data and save it to the data object on the block