From 64b0d4cf068a9d84f8bf74275ffd3f3c84e83ab2 Mon Sep 17 00:00:00 2001 From: Caleb Date: Mon, 23 Oct 2017 12:25:06 -0600 Subject: [PATCH] Update extending.md --- docs/extending.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/extending.md b/docs/extending.md index e87ee191..6c636f53 100755 --- a/docs/extending.md +++ b/docs/extending.md @@ -85,7 +85,7 @@ CMS.registerEditorComponent({ // Fields the user need to fill out when adding an instance of the component fields: [{name: 'id', label: 'Youtube Video ID', widget: 'string'}], // Pattern to identify a block as being an instance of this component - pattern: /youtube (\S+)\s/, + pattern: /^{{<\s?youtube (\S+)\s?>}}/, // Function to extract data elements from the regexp match fromBlock: function(match) { return { @@ -94,7 +94,7 @@ CMS.registerEditorComponent({ }, // Function to create a text block from an instance of this component toBlock: function(obj) { - return 'youtube ' + obj.id; + return '{{< youtube ' + obj.id + ' >}}'; }, // Preview output for this component. Can either be a string or a React component // (component gives better render performance)