Merge branch 'fix-editor-button' into linting

This commit is contained in:
Ben Goldsworthy 2021-04-25 19:38:06 +01:00
commit c46638cf3e
3 changed files with 3 additions and 3 deletions

View file

@ -246,7 +246,7 @@ class Footnotes {
*/
wp_enqueue_script(
'mci-footnotes-jquery-tools',
plugins_url( 'footnotes/js/jquery.tools.min.js' ),
plugins_url( 'footnotes/js/jquery.tools' . ( (PRODUCTION_ENV) ? '.min' : '' ) . '.js' ),
array(),
'1.2.7.redacted.2',
false

View file

@ -74,7 +74,7 @@ class Footnotes_WYSIWYG {
* @return array
*/
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;
}

View file

@ -31,7 +31,7 @@
success: function (data, textStatus, XMLHttpRequest) {
var tags = JSON.parse(data);
var returnText = tags.start + ed.selection.getContent() + tags.end;
ed.execCommand('insertHTML', true, returnText);
ed.insertContent(returnText);
},
error: function (MLHttpRequest, textStatus, errorThrown) {
console.log('Error: ' + errorThrown);