Skip to content
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

Tinymce single/mimic ui prototype #162

Merged
merged 2 commits into from
Mar 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tinymce-single/blocks/elements/lists/register.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ window.wp.blocks.register( {
}
},
{
icon: 'gridicons-posts',
classes: 'remove-formatting',
icon: 'gridicons-list-unordered',
onClick: function( editor, element ) {
if ( element.nodeName === 'UL' ) {
editor.execCommand( 'InsertUnorderedList' );
Expand Down
5 changes: 3 additions & 2 deletions tinymce-single/blocks/elements/preformatted/register.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ window.wp.blocks.register( {
icon: 'gridicons-code',
buttons: [
{
text: 'syntax'
icon: 'gridicons-cog'
},
{
icon: 'gridicons-posts',
classes: 'remove-formatting',
icon: 'gridicons-code',
onClick: function( editor ) {
editor.formatter.remove( 'pre' );
}
Expand Down
17 changes: 9 additions & 8 deletions tinymce-single/tinymce/block.css
Original file line number Diff line number Diff line change
Expand Up @@ -256,16 +256,17 @@ div.mce-inline-toolbar-grp.block-toolbar {
box-shadow: none;
}

.mce-btn.mce-move-up {
position: absolute;
top: -10px;
left: -30px;
.mce-btn.mce-move-up,
.mce-btn.mce-move-down {
display: block;
}

.mce-btn.mce-move-down {
position: absolute;
bottom: -10px;
left: -30px;
.mce-btn.mce-move-up,
.mce-btn.mce-move-up button,
.mce-btn.mce-move-down,
.mce-btn.mce-move-down button {
padding-top: 0;
padding-bottom: 0;
}

.block-toolbar {
Expand Down
2 changes: 1 addition & 1 deletion tinymce-single/tinymce/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@

var toolbarInline = editor.wp._createToolbar( [ 'bold', 'italic', 'strikethrough', 'link' ] );
var toolbarCaret = editor.wp._createToolbar( [ 'add' ] );
blockToolbar = editor.wp._createToolbar( [ 'up', 'block', 'down' ] );
blockToolbar = editor.wp._createToolbar( [ 'up', 'down' ] );

toolbarCaret.$el.addClass( 'block-toolbar' );
blockToolbar.$el.addClass( 'block-toolbar' );
Expand Down