Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 't/11085'
  • Loading branch information
Reinmar committed Dec 5, 2013
2 parents 37761cf + 4baebef commit 4cdcded
Show file tree
Hide file tree
Showing 3 changed files with 218 additions and 156 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Expand Up @@ -12,6 +12,7 @@ Fixed Issues:

* [#11244](http://dev.ckeditor.com/ticket/11244): Changed: The [`widget.repository.checkWidgets`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.repository-method-checkWidgets) method now fires the [`widget.repository.checkWidgets`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.repository-event-checkWidgets) event, so from CKEditor 4.3.1 it's preferred to use method rather than fire event.
* [#11171](http://dev.ckeditor.com/ticket/11171): Fixed: [`editor.insertElement`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-insertElement) and [`editor.insertText`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-insertText) methods do not call the [`widget.repository.checkWidgets`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.repository-method-checkWidgets) method.
* [#11085](http://dev.ckeditor.com/ticket/11085): [IE8] Replaced preview generated by [Mathematical Formulas](http://ckeditor.com/addon/mathjax) widget with a placeholder.
* [#11044](http://dev.ckeditor.com/ticket/11044): Enhanced aria support for language plugin drop-down menu.
* [#11075](http://dev.ckeditor.com/ticket/11075): With drop-down menubutton focused, pressing down arrow key will now open menu and focus its first option.
* [#11165](http://dev.ckeditor.com/ticket/11165): Fixed: The filebrowser plugin cannot be removed from the editor.
Expand Down
17 changes: 8 additions & 9 deletions plugins/mathjax/dialogs/mathjax.js
Expand Up @@ -26,18 +26,17 @@ CKEDITOR.dialog.add( 'mathjax', function( editor ) {
onLoad: function( widget ) {
var that = this;

this.getInputElement().on( 'keyup', function() {
// Add \( and \) for preview.
preview.setValue( '\\(' + that.getInputElement().getValue() + '\\)' );
} );
if ( !( CKEDITOR.env.ie && CKEDITOR.env.version == 8 ) ) {
this.getInputElement().on( 'keyup', function() {
// Add \( and \) for preview.
preview.setValue( '\\(' + that.getInputElement().getValue() + '\\)' );
} );
}
},

setup: function( widget ) {
// Remove \( and \).
var math = widget.data.math,
begin = math.indexOf( '\\(' ) + 2,
end = math.lastIndexOf( '\\)' );
this.setValue( math.substring( begin, end ) );
this.setValue( CKEDITOR.plugins.mathjax.trim( widget.data.math ) );
},

commit: function( widget ) {
Expand All @@ -55,7 +54,7 @@ CKEDITOR.dialog.add( 'mathjax', function( editor ) {
'</a>' +
'</div>'
},
{
( !( CKEDITOR.env.ie && CKEDITOR.env.version == 8 ) ) && {
id: 'preview',
type: 'html',
html:
Expand Down

0 comments on commit 4cdcded

Please sign in to comment.