From 0eea98d4a9dcafb35026bd869a7026b643d31377 Mon Sep 17 00:00:00 2001 From: Ian Storm Taylor Date: Tue, 2 Aug 2016 10:33:02 -0700 Subject: [PATCH] fix link example --- examples/links/index.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/examples/links/index.js b/examples/links/index.js index 4ffba3d0a..85afb91e2 100644 --- a/examples/links/index.js +++ b/examples/links/index.js @@ -83,7 +83,10 @@ class Links extends React.Component { const href = window.prompt('Enter the URL of the link:') state = state .transform() - .wrapInline('link', new Map({ href })) + .wrapInline({ + type: 'link', + data: { href } + }) .collapseToEnd() .apply() } @@ -95,7 +98,10 @@ class Links extends React.Component { .transform() .insertText(text) .extendBackward(text.length) - .wrapInline('link', new Map({ href })) + .wrapInline({ + type: 'link', + data: { href } + }) .collapseToEnd() .apply() } @@ -123,7 +129,12 @@ class Links extends React.Component { } return transform - .wrapInline('link', { href: data.text }) + .wrapInline({ + type: 'link', + data: { + href: data.text + } + }) .collapseToEnd() .apply() }