From a3e996fa09e14502203cbf744fc52e244e731bd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=ADas=20Ventura?= Date: Wed, 3 May 2017 16:08:10 +0200 Subject: [PATCH 1/4] Update dummy content to function as an introduction to the editor. --- post-content.js | 42 +++++++++++++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/post-content.js b/post-content.js index 5d7f1cb1c5350..3e5aacf292c01 100644 --- a/post-content.js +++ b/post-content.js @@ -5,7 +5,7 @@ window._wpGutenbergPost = { content: { raw: [ '', - '

1.0 Is The Loneliest Number

', + '

Welcome to the Gutenberg Editor

', '', '', @@ -13,26 +13,54 @@ window._wpGutenbergPost = { '', '', - '

I imagine prior to the launch of the iPod, or the iPhone, there were teams saying the same thing: the copy + paste guys are so close to being ready and we know Walt Mossberg is going to ding us for this so let\'s just not ship to the manufacturers in China for just a few more weeks… The Apple teams were probably embarrassed. But if you\'re not embarrassed when you ship your first version you waited too long.

', + '

The goal of the new editor is to make adding rich content to WordPress simple and enjoyable. This whole post is composed of pieces of content—somewhat similar to Lego bricks—that you can move around and interact with. Move your cursor around and you\'ll notice the different blocks light up with outlines and arrows. Press the arrows to reposition blocks quickly, without fearing about losing things in the process of copying and pasting.

', + '

What you are reading now is a text block, the most basic block of all. A text block can have multiple paragraphs, if that\'s how you prefer to write your posts. But you can also split it by hitting enter twice. Once blocks are split they get their own controls to be moved freely around the post...

', '', + '', + '

... like this one, which is separate from the above and right aligned.

', + '', + + '', + '

The Inserter Tool

', + '', + + '', + '

(Headings are separate blocks as well.)

Imagine everything that WordPress can do is available to you quickly and in the same place on the interface. No need to figure out HTML tags, classes, or remember shortcode syntax. That\'s the spirit behind the inserter—the (+) button you\'ll see around the editor—which allows you to browse all available content blocks and insert them into your post. Plugins and themes will be able to register their own. Go give it a try, you may discover things WordPress can insert into your posts that you didn\'t know about.

', + '', + + '', + '', + '', + '', - '
', + '
', '', + '', + '

A picture is worth a thousand words

', + '', + + '', + '

Or so the saying goes. Working well with images and media is a primary focus of the new editor. Hopefully you\'ll find aspects like adding captions or going full-width with your images much easier and robust.

', + '', + '', - '
', + '

Check out the "really wide" option on the image settings

', '', '', - '

A beautiful thing about Apple is how quickly they obsolete their own products. I imagine this also makes the discipline of getting things out there easier. Like I mentioned before, the longer it’s been since the last release the more pressure there is, but if you know that if your bit of code doesn’t make this version but there’s the +0.1 coming out in 6 weeks, then it’s not that bad.

', - '

It’s like flights from San Francisco to LA, if you miss one you know there’s another one an hour later so it’s not a big deal. Amazon has done a fantastic job of this with the Kindle as well, with a new model every year.

', + '

Another benefit of blocks is that you can edit them in place and manipulate you content directly. Try editing the following quote:

', '', '', - '

Real artists ship.

', + '

Real artists ship.

', '', + '', + '

Fields like the source of the quote are separate, and even if you remove it you can get it back.

', + '', + '', '
Beautiful landscape
', '', From bc7b24396ed8b4f14433e02b46d9cafbf0da65bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=ADas=20Ventura?= Date: Thu, 4 May 2017 14:43:04 +0200 Subject: [PATCH 2/4] Introduce more blocks into default content, expand text. --- post-content.js | 62 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 43 insertions(+), 19 deletions(-) diff --git a/post-content.js b/post-content.js index 3e5aacf292c01..e344d32ad9ebe 100644 --- a/post-content.js +++ b/post-content.js @@ -8,57 +8,81 @@ window._wpGutenbergPost = { '

Welcome to the Gutenberg Editor

', '', - '', - '', - '', - '', - '

The goal of the new editor is to make adding rich content to WordPress simple and enjoyable. This whole post is composed of pieces of content—somewhat similar to Lego bricks—that you can move around and interact with. Move your cursor around and you\'ll notice the different blocks light up with outlines and arrows. Press the arrows to reposition blocks quickly, without fearing about losing things in the process of copying and pasting.

', - '

What you are reading now is a text block, the most basic block of all. A text block can have multiple paragraphs, if that\'s how you prefer to write your posts. But you can also split it by hitting enter twice. Once blocks are split they get their own controls to be moved freely around the post...

', + '

The goal of this new editor is to make adding rich content to WordPress simple and enjoyable. This whole post is composed of pieces of content—somewhat similar to LEGO bricks—that you can move around and interact with. Move your cursor around and you\'ll notice the different blocks light up with outlines and arrows. Press the arrows to reposition blocks quickly, without fearing about losing things in the process of copying and pasting.

', + '

What you are reading now is a text block, the most basic block of all. A text block can have multiple paragraphs, if that\'s how you prefer to write your posts. But you can also split it by hitting enter twice. Once blocks are split they get their own controls to be moved freely around the post...

', '', '', '

... like this one, which is separate from the above and right aligned.

', '', + '', + '

Headings are separate blocks as well, which helps with the outline and organization of your content.

', + '', + + '', + '

A picture is worth a thousand words, or so the saying goes

', + '', + + '', + '

Handling images and media with the utmost care is a primary focus of the new editor. Hopefully you\'ll find aspects like adding captions or going full-width with your pictures much easier and robust than before.

', + '', + + '', + '

Give it a try. Press the "really wide" button on the image toolbar.

', + '', + + '', + '

Try selecting and removing or editing the caption, now you don\'t have to be careful about selecting the image or other text by mistake and ruining the presentation.

', + '', + '', - '

The Inserter Tool

', + '

The Inserter Tool

', '', '', - '

(Headings are separate blocks as well.)

Imagine everything that WordPress can do is available to you quickly and in the same place on the interface. No need to figure out HTML tags, classes, or remember shortcode syntax. That\'s the spirit behind the inserter—the (+) button you\'ll see around the editor—which allows you to browse all available content blocks and insert them into your post. Plugins and themes will be able to register their own. Go give it a try, you may discover things WordPress can insert into your posts that you didn\'t know about.

', + '

Imagine everything that WordPress can do is available to you quickly and in the same place on the interface. No need to figure out HTML tags, classes, or remember complicated shortcode syntax. That\'s the spirit behind the inserter—the (+) button you\'ll see around the editor—which allows you to browse all available content blocks and insert them into your post. Plugins and themes are able to register their own, opening up all sort of posibilities for rich editing and publishing.

Go give it a try, you may discover things WordPress can already insert into your posts that you didn\'t know about. Here\'s a short list of what you can currently find there:

', '', '', - '', + '', '', + '', + '

If you want to learn more about how to build additional blocks, or if you are interested in helping with the project, head over to the GitHub repository.

', + '', + + '', + '', + '', + '', '
', '', '', - '

A picture is worth a thousand words

', + '

Visual Editing

', '', '', - '

Or so the saying goes. Working well with images and media is a primary focus of the new editor. Hopefully you\'ll find aspects like adding captions or going full-width with your images much easier and robust.

', + '

A huge benefit of blocks is that you can edit them in place and manipulate you content directly. Instead of having fields for editing things like the source of a quote, or the text of a button, you can directly change the content. Try editing the following quote:

', '', - '', - '

Check out the "really wide" option on the image settings

', - '', + '', + '

The editor will endeavour to create a new page and post building experience that makes writing rich posts effortless, and has “blocks” to make it easy what today might take shortcodes, custom HTML, or “mystery meat” embed discovery.

Matt Mullenweg, 2017

', + '', '', - '

Another benefit of blocks is that you can edit them in place and manipulate you content directly. Try editing the following quote:

', + '

The information corresponding to the source of the quote is a separate text field, similar to captions under images, so the structure of the quote is protected even if you select, modify, or remove the source. It\'s always easy to add it back.

', '', - '', - '

Real artists ship.

', - '', + '', + '

Blocks can be anything you need. For instance, you may want to insert a subdued quote as part of the composition of your text, or you may prefer to display a giant stylized one. All of these options are available in the inserter.

', + '', '', - '

Fields like the source of the quote are separate, and even if you remove it you can get it back.

', + '

Use fancy quote here...

', '', '', From 761533252d55ff3def43d98ed4caa9a9c9ca689a Mon Sep 17 00:00:00 2001 From: Joen Asmussen Date: Fri, 5 May 2017 12:55:30 +0200 Subject: [PATCH 3/4] Add some extra post content to the end. Also snuck in a "code" so we can check the link boundary. --- post-content.js | 44 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/post-content.js b/post-content.js index e344d32ad9ebe..f4b064572829c 100644 --- a/post-content.js +++ b/post-content.js @@ -38,11 +38,11 @@ window._wpGutenbergPost = { '', '', - '

The Inserter Tool

', + '

The Inserter Tool

', '', '', - '

Imagine everything that WordPress can do is available to you quickly and in the same place on the interface. No need to figure out HTML tags, classes, or remember complicated shortcode syntax. That\'s the spirit behind the inserter—the (+) button you\'ll see around the editor—which allows you to browse all available content blocks and insert them into your post. Plugins and themes are able to register their own, opening up all sort of posibilities for rich editing and publishing.

Go give it a try, you may discover things WordPress can already insert into your posts that you didn\'t know about. Here\'s a short list of what you can currently find there:

', + '

Imagine everything that WordPress can do is available to you quickly and in the same place on the interface. No need to figure out HTML tags, classes, or remember complicated shortcode syntax. That\'s the spirit behind the inserter—the (+) button you\'ll see around the editor—which allows you to browse all available content blocks and insert them into your post. Plugins and themes are able to register their own, opening up all sort of posibilities for rich editing and publishing.

Go give it a try, you may discover things WordPress can already insert into your posts that you didn\'t know about. Here\'s a short list of what you can currently find there:

', '', '', @@ -62,7 +62,7 @@ window._wpGutenbergPost = { '', '', - '

Visual Editing

', + '

Visual Editing

', '', '', @@ -81,20 +81,49 @@ window._wpGutenbergPost = { '

Blocks can be anything you need. For instance, you may want to insert a subdued quote as part of the composition of your text, or you may prefer to display a giant stylized one. All of these options are available in the inserter.

', '', + '', + '

There is no greater agony than bearing an untold story inside you.

Maya Angelou

', + '', + + '', + '
', + '', + + '', + '

Sea id autem nominavi deseruisse

', + '', + '', - '

Use fancy quote here...

', + '

Ea veniam homero eam. Ex inimicus molestiae cum, debet scaevola at eos. Vis assum veritus ut, has ea nostrud accusata, offendit appareat comprehensam ea pro. Ad quo quem veritus appellantur, te est quas phaedrum, eum alia habeo ad. Ei est erroribus imperdiet, omnis dicam propriae sed no. His vitae oratio fierent ne, cu duo tota eligendi, electram rationibus in qui.

', '', '', - '
Beautiful landscape
', + '
', '', '', - '

By shipping early and often you have the unique competitive advantage of hearing from real people what they think of your work, which in best case helps you anticipate market direction, and in worst case gives you a few people rooting for you that you can email when your team pivots to a new idea. Nothing can recreate the crucible of real usage.

', + '

Est quis reque cetero ad. Sea id autem nominavi deseruisse. Veniam qualisque definitionem pri id, ea autem feugiat delenit ius, mei at loem affert accumsan. Dicat eruditi cu est, te pro dicant pericula conclusionemque, ei vim detracto euripidis intellegam. Eius postea volumus mei ad.

', + '

Prima ridens denique his te, ferri illum volumus an his. Eu vel dicat homero qualisqu, vitae regione deserunt vis ei. Graeci incorrupte liberavisse no mea, saepe voluptaria usu ex, vis dicant euismod id. At dolor reprimique eos, quo altera detraxit moderatius id. Quo iudico utinam eu, ad alia munere mel.

', '', + '', + '
', + '', + + '', + '
', + '', + + '', + '

sed te impetus gubergren conceptam, ex sed wisi nostrum ocurreret. Esse velit omittantur ius te, alii dissentias ei vis. At sed unum veritus fabellas. Te volutpat appellantur duo. Ad natum fuisset intellegebat eam, causae invidunt usu id, et vis impetus appetere.

', + '', + + '', + '
Loem
', + '', + '', - '
  • Ship early
  • Ship often
  • Listen to feedback from real people
  • Anticipate market direction
', + '
  • Est quis reque cetero ad
  • Sea id autem nominavi deseruisse
  • Veniam qualisque definitionem pri id, ea autem feugiat delenit ius, mei at loem affert accumsan
  • Dicat eruditi cu est, te pro dicant pericula conclusionemque
  • Eius postea volumus mei ad
', '', '', @@ -103,4 +132,3 @@ window._wpGutenbergPost = { ].join( '' ), }, }; - From f04d10b6062429300e3f90e97173d799795859df Mon Sep 17 00:00:00 2001 From: Joen Asmussen Date: Fri, 5 May 2017 13:06:28 +0200 Subject: [PATCH 4/4] Move video, add caption. --- post-content.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/post-content.js b/post-content.js index f4b064572829c..0c4980bbce228 100644 --- a/post-content.js +++ b/post-content.js @@ -37,6 +37,10 @@ window._wpGutenbergPost = { '

Try selecting and removing or editing the caption, now you don\'t have to be careful about selecting the image or other text by mistake and ruining the presentation.

', '', + '', + '

State of the Word 2016

', + '', + '', '

The Inserter Tool

', '', @@ -125,10 +129,6 @@ window._wpGutenbergPost = { '', '
  • Est quis reque cetero ad
  • Sea id autem nominavi deseruisse
  • Veniam qualisque definitionem pri id, ea autem feugiat delenit ius, mei at loem affert accumsan
  • Dicat eruditi cu est, te pro dicant pericula conclusionemque
  • Eius postea volumus mei ad
', '', - - '', - '', - '', ].join( '' ), }, };