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

Use TinyMCE nightly for contenteditable false fixes #234

Merged
merged 1 commit into from
Mar 10, 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
4 changes: 2 additions & 2 deletions shared/tinymce/toolbar.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
( function( tinymce ) {
tinymce.ui.svgbutton = tinymce.ui.Button.extend( {
tinymce.ui.Factory.add( 'svgbutton', tinymce.ui.Button.extend( {
renderHtml: function() {
var id = this._id;
var prefix = this.classPrefix;
Expand Down Expand Up @@ -53,7 +53,7 @@
active: function( isActive ) {
this.$( this.getEl() ).toggleClass( 'is-active', isActive );
}
} );
} ) );

tinymce.PluginManager.add( 'toolbar', function( editor ) {
var each = tinymce.each;
Expand Down
8 changes: 4 additions & 4 deletions shared/tinymce/wplink.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
( function( tinymce ) {
tinymce.ui.WPLinkPreview = tinymce.ui.Control.extend( {
tinymce.ui.Factory.add( 'WPLinkPreview', tinymce.ui.Control.extend( {
url: '#',
renderHtml: function() {
return (
Expand Down Expand Up @@ -50,9 +50,9 @@
tinymce.$( this.getEl().firstChild ).attr( 'href', this.url ).text( url );
}
}
} );
} ) );

tinymce.ui.WPLinkInput = tinymce.ui.Control.extend( {
tinymce.ui.Factory.add( 'WPLinkInput', tinymce.ui.Control.extend( {
renderHtml: function() {
return (
'<div id="' + this._id + '" class="wp-link-input">' +
Expand Down Expand Up @@ -82,7 +82,7 @@
urlInput.value = '';
urlInput.nextSibling.value = '';
}
} );
} ) );

tinymce.PluginManager.add( 'wplink', function( editor ) {
var toolbar;
Expand Down
2 changes: 1 addition & 1 deletion tinymce-single/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ <h2>NASA discovers system of seven Earth-sized planets</h2>

<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tinymce/4.5.5/tinymce.min.js"></script>
<script src="https://fiddle.azurewebsites.net/tinymce/nightly/tinymce.min.js"></script>

<script src="blocks.js"></script>
<script src="blocks/core/image/register.js"></script>
Expand Down
7 changes: 4 additions & 3 deletions tinymce-single/tinymce/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@
function createInsertToolbar() {
var insert = editor.wp._createToolbar( [ 'add' ] );

insert.$el.addClass( 'block-toolbar insert-toolbar' );
insert.$el.addClass( 'block-toolbar' );
insert.$el.addClass( 'insert-toolbar' );

insert.reposition = function ( settings ) {
settings = settings || {};
Expand Down Expand Up @@ -242,13 +243,13 @@
return insert;
}

window.tinymce.ui.WPInsertSeparator = tinymce.ui.Control.extend( {
tinymce.ui.Factory.add( 'WPInsertSeparator', tinymce.ui.Control.extend( {
renderHtml: function() {
return (
'<div id="' + this._id + '" class="insert-separator">' + this.settings.text + '</div>'
);
}
} );
} ) );

function createInsertMenu() {
var insertMenu = editor.wp._createToolbar( ( function() {
Expand Down