-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Allow editing actual posts and pages #356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
ec122e1
Restructure editor to accept and load actual post content
nylen 2152958
Add links to edit posts and pages in the Gutenberg editor
nylen d032dc0
Load real or test post content into the same global variable
nylen 3c3c8d7
Avoid unused variable error
nylen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Load real or test post content into the same global variable
- Loading branch information
commit d032dc001290d243809f35dc11a04ec0c84b205a
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,33 +1,40 @@ | ||
| window.content = [ | ||
| '<!-- wp:core/heading -->', | ||
| '<h1>1.0 Is The Loneliest Number</h1>', | ||
| '<!-- /wp:core/heading -->', | ||
| /** | ||
| * Temporary test post content | ||
| */ | ||
| var _wpGutenbergPost = { | ||
| content: { | ||
| raw: [ | ||
| '<!-- wp:core/heading -->', | ||
| '<h1>1.0 Is The Loneliest Number</h1>', | ||
| '<!-- /wp:core/heading -->', | ||
|
|
||
| '<!-- wp:core/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:core/text -->', | ||
| '<!-- wp:core/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:core/text -->', | ||
|
|
||
| '<!-- wp:core/image -->', | ||
| '<figure><img src="https://cldup.com/Bc9YxmqFnJ.jpg" /></figure>', | ||
| '<!-- /wp:core/image -->', | ||
| '<!-- wp:core/image -->', | ||
| '<figure><img src="https://cldup.com/Bc9YxmqFnJ.jpg" /></figure>', | ||
| '<!-- /wp:core/image -->', | ||
|
|
||
| '<!-- wp:core/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:core/text -->', | ||
| '<!-- wp:core/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:core/text -->', | ||
|
|
||
| '<!-- wp:core/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:core/quote -->', | ||
| '<!-- wp:core/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:core/quote -->', | ||
|
|
||
| '<!-- wp:core/image -->', | ||
| '<figure><img src="https://cldup.com/vuGcj2VB8M.jpg" /><figcaption>Beautiful landscape</figcaption></figure>', | ||
| '<!-- /wp:core/image -->', | ||
| '<!-- wp:core/image -->', | ||
| '<figure><img src="https://cldup.com/vuGcj2VB8M.jpg" /><figcaption>Beautiful landscape</figcaption></figure>', | ||
| '<!-- /wp:core/image -->', | ||
|
|
||
| '<!-- wp:core/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:core/text -->', | ||
| '<!-- wp:core/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:core/text -->', | ||
|
|
||
| '<!-- wp:core/embed url:https://www.youtube.com/watch?v=Nl6U7UotA-M -->', | ||
| '<iframe width="560" height="315" src="//www.youtube.com/embed/Nl6U7UotA-M" frameborder="0" allowfullscreen></iframe>', | ||
| '<!-- /wp:core/embed -->' | ||
| ].join( '' ); | ||
| '<!-- wp:core/embed url:https://www.youtube.com/watch?v=Nl6U7UotA-M -->', | ||
| '<iframe width="560" height="315" src="//www.youtube.com/embed/Nl6U7UotA-M" frameborder="0" allowfullscreen></iframe>', | ||
| '<!-- /wp:core/embed -->', | ||
| ].join( '' ), | ||
| }, | ||
| }; |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here and elsewhere, I've restructured the code in this function to avoid long lines, which are really detrimental to code readability. I'd recommend that we do this throughout the project, and add rule(s) to our linting setup(s) accordingly.