Merge branch 'fix-editor-button' into linting
This commit is contained in:
commit
c46638cf3e
3 changed files with 3 additions and 3 deletions
|
@ -246,7 +246,7 @@ class Footnotes {
|
||||||
*/
|
*/
|
||||||
wp_enqueue_script(
|
wp_enqueue_script(
|
||||||
'mci-footnotes-jquery-tools',
|
'mci-footnotes-jquery-tools',
|
||||||
plugins_url( 'footnotes/js/jquery.tools.min.js' ),
|
plugins_url( 'footnotes/js/jquery.tools' . ( (PRODUCTION_ENV) ? '.min' : '' ) . '.js' ),
|
||||||
array(),
|
array(),
|
||||||
'1.2.7.redacted.2',
|
'1.2.7.redacted.2',
|
||||||
false
|
false
|
||||||
|
|
|
@ -74,7 +74,7 @@ class Footnotes_WYSIWYG {
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public static function include_scripts( $p_arr_plugins ) {
|
public static function include_scripts( $p_arr_plugins ) {
|
||||||
$p_arr_plugins[ Footnotes_Config::C_STR_PLUGIN_NAME ] = plugins_url( '/../js/wysiwyg-editor' . ( ( PRODUCTION_ENV ) ? '.min' : '' ) . '.js', __FILE__ );
|
$p_arr_plugins[ Footnotes_Config::C_STR_PLUGIN_NAME ] = plugins_url( 'js/wysiwyg-editor' . ( ( PRODUCTION_ENV ) ? '.min' : '' ) . '.js', dirname(__FILE__) );
|
||||||
return $p_arr_plugins;
|
return $p_arr_plugins;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
success: function (data, textStatus, XMLHttpRequest) {
|
success: function (data, textStatus, XMLHttpRequest) {
|
||||||
var tags = JSON.parse(data);
|
var tags = JSON.parse(data);
|
||||||
var returnText = tags.start + ed.selection.getContent() + tags.end;
|
var returnText = tags.start + ed.selection.getContent() + tags.end;
|
||||||
ed.execCommand('insertHTML', true, returnText);
|
ed.insertContent(returnText);
|
||||||
},
|
},
|
||||||
error: function (MLHttpRequest, textStatus, errorThrown) {
|
error: function (MLHttpRequest, textStatus, errorThrown) {
|
||||||
console.log('Error: ' + errorThrown);
|
console.log('Error: ' + errorThrown);
|
||||||
|
|
Reference in a new issue