Skip to content

Commit

Permalink
Merge pull request #178 from WordPress/add/shared/post-content
Browse files Browse the repository at this point in the history
Adding a shared sample post content
  • Loading branch information
aduth authored Mar 3, 2017
2 parents b9e5350 + 808b59b commit 0c0b767
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 5 deletions.
33 changes: 33 additions & 0 deletions shared/post-content.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
window.content = [
'<!-- wp:heading -->',
'<h1>1.0 Is The Loneliest Number</h1>',
'<!-- /wp -->',

'<!-- wp:text -->',
'<p>I imagine prior to the launch of the iPod, or the iPhone, there were teams saying the same thing: the copy + paste guys are <em>so close</em> 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 <strong>if you\'re not embarrassed when you ship your first version you waited too long</strong>.</p>',
'<!-- /wp -->',

'<!-- wp:image -->',
'<figure><img src="https://cldup.com/Bc9YxmqFnJ.jpg" /></figure>',
'<!-- /wp -->',

'<!-- wp:text -->',
'<p>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.</p>',
'<!-- /wp -->',

'<!-- wp:quote -->',
'<blockquote><p>Real artists ship.</p><footer><p><a href="http://www.folklore.org/StoryView.py?story=Real_Artists_Ship.txt">Steve Jobs, 1983</a></p></footer></blockquote>',
'<!-- /wp -->',

'<!-- wp:image -->',
'<figure><img src="https://cldup.com/vuGcj2VB8M.jpg" /><figcaption>Beautiful landscape</figcaption></figure>',
'<!-- /wp -->',

'<!-- wp:text -->',
'<p>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.</p>',
'<!-- /wp -->',

'<!-- wp:embed -->',
'https://www.youtube.com/watch?v=Nl6U7UotA-M',
'<!-- /wp -->'
].join( '' );
4 changes: 0 additions & 4 deletions tinymce-per-block/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
</head>
<body>
<div class="editor"></div>
<script>
window.content = '<!-- wp:heading size:h2 --><h2>1.0 Is The Loneliest Number</h2><!-- /wp --><!-- wp:quote --><blockquote><p>Design is not just what it looks like and feels like. Design is how it works.</p><footer>Steve Jobs</footer></blockquote><!-- /wp --><!-- wp:paragraph --><p>Many entrepreneurs idolize Steve Jobs. He’s such a perfectionist , they say. Nothing leaves the doors of 1 Infinite Loop in Cupertino without a polish and finish that makes geeks everywhere drool. No compromise!</p><!-- /wp --><!-- wp:text -->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.<!-- /wp --><!-- wp:text -->I like Apple for the opposite reason: <strong>they’re not afraid of getting a rudimentary 1.0 out into the world</strong>.<!-- /wp --><!-- wp:image --><img src="https://matiasventura.files.wordpress.com/2017/02/blue.png?w=720"><!-- /wp --><!-- wp:paragraph --><p>Many entrepreneurs idolize Steve Jobs. He’s such a perfectionist , they say. Nothing leaves the doors of 1 Infinite Loop in Cupertino without a polish and finish that makes geeks everywhere drool. No compromise!</p><!-- /wp -->';
</script>

<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Merriweather:300,300i,400,400i,700,700i">
<script src="https://cdnjs.cloudflare.com/ajax/libs/tinymce/4.5.3/tinymce.min.js"></script>
<script src="build/app.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion tinymce-per-block/src/blocks/quote-block/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ registerBlock( 'quote', {
: div.firstChild.firstChild.outerHTML;

const cite = div.firstChild.childNodes.length > 1
? div.firstChild.childNodes[ 1 ].innerHTML
? div.firstChild.lastChild.textContent
: '';

return {
Expand Down
1 change: 1 addition & 0 deletions tinymce-per-block/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { createElement, Component, render } from 'wp-elements';
/**
* Internal dependencies
*/
import '../../shared/post-content';
import * as parsers from 'parsers';
import * as renderers from 'renderers';
import * as serializers from 'serializers';
Expand Down

0 comments on commit 0c0b767

Please sign in to comment.