Browse Source

Avec l'aide de Marcimat, up de la lib de 1.1.14 vers 1.1.15 (https://github.com/markitup/1.x/blob/master/CHANGELOG.md)

3.2
real3t@gmail.com 4 years ago
parent
commit
4105a58efd
  1. 15
      javascript/jquery.markitup.js
  2. 18
      javascript/jquery.markitup_pour_spip.js
  3. 2
      paquet.xml

15
javascript/jquery.markitup.js

@ -1,6 +1,6 @@
// ----------------------------------------------------------------------------
// markItUp! Universal MarkUp Engine, JQuery plugin
// v 1.1.14 ( c014800b - 02/06/2014 )
// v 1.1.15 ( e147ca3 - 16/08/2018 )
// Dual licensed under the MIT and GPL licenses.
// ----------------------------------------------------------------------------
// Copyright (C) 2007-2012 Jay Salvat
@ -60,7 +60,7 @@
// compute markItUp! path
if (!options.root) {
$('script').each(function(a, tag) {
miuScript = $(tag).get(0).src.match(/(.*)jquery\.markitup(\.pack)?\.js$/);
var miuScript = $(tag).get(0).src.match(/(.*)jquery\.markitup(\.pack)?\.js$/);
if (miuScript !== null) {
options.root = miuScript[1];
}
@ -538,18 +538,19 @@
function renderPreview() {
var phtml;
var parsedData = $$.val();
if (options.previewParser && typeof options.previewParser === 'function') {
parsedData = options.previewParser(parsedData);
}
if (options.previewHandler && typeof options.previewHandler === 'function') {
options.previewHandler( $$.val() );
} else if (options.previewParser && typeof options.previewParser === 'function') {
var data = options.previewParser( $$.val() );
writeInPreview(localize(data, 1) );
options.previewHandler(parsedData);
} else if (options.previewParserPath !== '') {
$.ajax({
type: options.previewParserAjaxType,
dataType: 'text',
global: false,
url: options.previewParserPath,
data: options.previewParserVar+'='+encodeURIComponent($$.val()),
data: options.previewParserVar+'='+encodeURIComponent(parsedData),
success: function(data) {
writeInPreview( localize(data, 1) );
}

18
javascript/jquery.markitup_pour_spip.js

@ -1,6 +1,6 @@
// ----------------------------------------------------------------------------
// markItUp! Universal MarkUp Engine, JQuery plugin
// v 1.1.14 ( c014800b - 02/06/2014 )
// v 1.1.15 ( e147ca3 - 16/08/2018 )
// Dual licensed under the MIT and GPL licenses.
// ----------------------------------------------------------------------------
// Copyright (C) 2007-2012 Jay Salvat
@ -26,7 +26,7 @@
// ----------------------------------------------------------------------------
/*
* Le code original de markitup 1.1.14
* Le code original de markitup 1.1.15
* a ete modifie pour prendre en compte
*
* 1) la langue utilisee dans les textarea :
@ -89,7 +89,7 @@
// compute markItUp! path
if (!options.root) {
$('script').each(function(a, tag) {
miuScript = $(tag).get(0).src.match(/(.*)jquery\.markitup(\.pack)?\.js$/);
var miuScript = $(tag).get(0).src.match(/(.*)jquery\.markitup(\.pack)?\.js$/);
if (miuScript !== null) {
options.root = miuScript[1];
}
@ -722,18 +722,19 @@
function renderPreview() {
var phtml;
var parsedData = $$.val();
if (options.previewParser && typeof options.previewParser === 'function') {
parsedData = options.previewParser(parsedData);
}
if (options.previewHandler && typeof options.previewHandler === 'function') {
options.previewHandler( $$.val() );
} else if (options.previewParser && typeof options.previewParser === 'function') {
var data = options.previewParser( $$.val() );
writeInPreview(localize(data, 1) );
options.previewHandler(parsedData);
} else if (options.previewParserPath !== '') {
$.ajax({
type: options.previewParserAjaxType,
dataType: 'text',
global: false,
url: options.previewParserPath,
data: options.previewParserVar+'='+encodeURIComponent($$.val()),
data: options.previewParserVar+'='+encodeURIComponent(parsedData),
success: function(data) {
writeInPreview( localize(data, 1) );
}
@ -861,5 +862,4 @@
$('textarea').trigger('insertion', [options]);
}
};
})(jQuery);

2
paquet.xml

@ -1,7 +1,7 @@
<paquet
prefix="porte_plume"
categorie="edition"
version="1.18.2"
version="1.18.3"
etat="stable"
compatibilite="[3.2.0;3.2.*]"
logo="images/porte-plume-32.png"

Loading…
Cancel
Save