Skip to content

Commit

Permalink
Merge pull request #124 from WordPress/update/tinymce-single-nav
Browse files Browse the repository at this point in the history
Use common navigation for single TinyMCE instance prototype
  • Loading branch information
ellatrix committed Feb 23, 2017
2 parents e28bc02 + 766c69f commit fec4752
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 27 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,6 @@ <h2>1.0 Is The Loneliest Number</h2>
</div>
</div>
<script src="blocks.js"></script>
<script src="navigation.js"></script>
<script src="shared/navigation.js"></script>
</body>
</html>
20 changes: 4 additions & 16 deletions shared/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,6 @@ body {
margin: 1em;
}

a {
color: inherit;
}

nav {
font-size: 16px;
}

nav:target {
display: none;
}

nav li.is-active {
font-weight: bold;
}

#editor {
background: #fff;
margin: 5em auto;
Expand All @@ -31,6 +15,10 @@ nav li.is-active {
width: 37.5em;
}

#editor a {
color: inherit;
}

#editor iframe {
max-width: 100%;
border: 0;
Expand Down
3 changes: 2 additions & 1 deletion navigation.js → shared/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
*/
PROTOTYPES = {
'/': 'UI Prototype',
'/tinymce-per-block/': 'TinyMCE per block prototype'
'/tinymce-per-block/': 'TinyMCE per block prototype',
'/tinymce-single/': 'Single TinyMCE instance prototype'
};

// Generate Navigation DOM
Expand Down
2 changes: 1 addition & 1 deletion tinymce-per-block/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
<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>
<script src="../navigation.js"></script>
<script src="../shared/navigation.js"></script>
</body>
</html>
9 changes: 1 addition & 8 deletions tinymce-single/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,6 @@
<link rel="stylesheet" type="text/css" href="../shared/index.css">
</head>
<body>
<!-- Target to hide: #user-test -->
<nav id="user-test">
<ol>
<li><a href="../">Main UI prototype</a></li>
<li><a href="../tinymce-per-block/">TinyMCE Instance per Block</a></li>
<li class="is-active">Single TinyMCE Instance</li>
</ol>
</nav>
<div id="editor">
<h1>1.0 Is The Loneliest Number</h1>

Expand All @@ -27,6 +19,7 @@ <h1>1.0 Is The Loneliest Number</h1>
<p>I like Apple for the opposite reason: they’re not afraid of getting a rudimentary 1.0 out into the world.</p>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tinymce/4.5.3/tinymce.min.js"></script>
<script src="../shared/navigation.js"></script>
<script src="../shared/tinymce/clean-paste.js"></script>
<script src="../shared/tinymce/toolbar.js"></script>
<script src="../shared/tinymce/wplink.js"></script>
Expand Down

0 comments on commit fec4752

Please sign in to comment.