- Bugfix: WYSIWYG editor and plain text editor buttons insert footnote short code correctly (also if defined like html tag)

git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@921814 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
Aricura 2014-05-27 18:40:55 +00:00
parent 7c038dde35
commit 6a2688058d
5 changed files with 9 additions and 3 deletions

View file

@ -232,6 +232,9 @@ function footnotes_getFromString($p_str_Content)
$l_str_EndingTag = $g_arr_FootnotesSettings[FOOTNOTE_INPUTFIELD_PLACEHOLDER_END_USERDEFINED]; $l_str_EndingTag = $g_arr_FootnotesSettings[FOOTNOTE_INPUTFIELD_PLACEHOLDER_END_USERDEFINED];
} }
/* decode html special chars */
$p_str_Content = htmlspecialchars_decode($p_str_Content);
/* check for a footnote placeholder in the current page */ /* check for a footnote placeholder in the current page */
do { do {
/* get first occurence of a footnote starting tag */ /* get first occurence of a footnote starting tag */

View file

@ -91,7 +91,7 @@ function footnotes_wysiwyg_ajax_callback() {
require_once(dirname(__FILE__) . '/../includes/plugin-settings.php'); require_once(dirname(__FILE__) . '/../includes/plugin-settings.php');
/* load footnote settings */ /* load footnote settings */
$g_arr_FootnotesSettings = footnotes_filter_options(FOOTNOTE_SETTINGS_CONTAINER, Class_FootnotesSettings::$a_arr_Default_Settings, false); $g_arr_FootnotesSettings = footnotes_filter_options(FOOTNOTE_SETTINGS_CONTAINER, Class_FootnotesSettings::$a_arr_Default_Settings, true);
/* get footnote starting tag */ /* get footnote starting tag */
$l_str_StartingTag = $g_arr_FootnotesSettings[FOOTNOTE_INPUTFIELD_PLACEHOLDER_START]; $l_str_StartingTag = $g_arr_FootnotesSettings[FOOTNOTE_INPUTFIELD_PLACEHOLDER_START];

View file

@ -4,7 +4,7 @@
Plugin URI: http://wordpress.org/plugins/footnotes/ Plugin URI: http://wordpress.org/plugins/footnotes/
Description: time to bring footnotes to your website! footnotes are known from offline publishing and everybody takes them for granted when reading a magazine. Description: time to bring footnotes to your website! footnotes are known from offline publishing and everybody takes them for granted when reading a magazine.
Author: media competence institute Author: media competence institute
Version: 1.2.1 Version: 1.2.2
Author URI: http://cheret.co.uk/mci Author URI: http://cheret.co.uk/mci
Text Domain: footnotes Text Domain: footnotes
Domain Path: /languages Domain Path: /languages

View file

@ -31,7 +31,7 @@
var l_arr_Tags = JSON.parse(data); var l_arr_Tags = JSON.parse(data);
var return_text = l_arr_Tags['start'] + ed.selection.getContent() + l_arr_Tags['end']; var return_text = l_arr_Tags['start'] + ed.selection.getContent() + l_arr_Tags['end'];
console.log(return_text); console.log(return_text);
ed.execCommand('mceInsertContent', 0, return_text); ed.execCommand('insertHTML', true, return_text);
}, },
error: function(MLHttpRequest, textStatus, errorThrown){ error: function(MLHttpRequest, textStatus, errorThrown){
console.log("Error: " + errorThrown); console.log("Error: " + errorThrown);

View file

@ -61,6 +61,9 @@ No, this Plugin has been written from scratch. Of course some inspirations on ho
== Changelog == == Changelog ==
= 1.2.2 =
- Bugfix: WYSIWYG editor and plain text editor buttons insert footnote short code correctly (also if defined like html tag)
= 1.2.1 = = 1.2.1 =
- Bugfix: HowTo example will be displayed correctly if a user defined short code is set - Bugfix: HowTo example will be displayed correctly if a user defined short code is set