This commit is contained in:
2026-03-20 17:13:38 +01:00
parent 4c84735b75
commit c043ee9a52
1152 changed files with 317560 additions and 0 deletions
@@ -0,0 +1,129 @@
/* ===========================================================
* trumbowyg.noembed.js v1.0
* noEmbed plugin for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Jake Johns (jakejohns)
*/
(function ($) {
'use strict';
var defaultOptions = {
proxy: 'https://noembed.com/embed?nowrap=on',
urlFiled: 'url',
data: [],
success: undefined,
error: undefined
};
$.extend(true, $.trumbowyg, {
langs: {
// jshint camelcase:false
en: {
noembed: 'Noembed',
noembedError: 'Error'
},
cs: {
noembedError: 'Chyba'
},
da: {
noembedError: 'Fejl'
},
et: {
noembed: 'Noembed',
noembedError: 'Viga'
},
fr: {
noembedError: 'Erreur'
},
hu: {
noembed: 'Noembed',
noembedError: 'Hiba'
},
ja: {
noembedError: 'エラー'
},
ko: {
noembed: 'oEmbed 넣기',
noembedError: '에러'
},
pt_br: {
noembed: 'Incorporar',
noembedError: 'Erro'
},
ru: {
noembedError: 'Ошибка'
},
sk: {
noembedError: 'Chyba'
},
tr: {
noembedError: 'Hata'
},
zh_tw: {
noembed: '插入影片',
noembedError: '錯誤'
},
// jshint camelcase:true
},
plugins: {
noembed: {
init: function (trumbowyg) {
trumbowyg.o.plugins.noembed = $.extend(true, {}, defaultOptions, trumbowyg.o.plugins.noembed || {});
var btnDef = {
fn: function () {
var $modal = trumbowyg.openModalInsert(
// Title
trumbowyg.lang.noembed,
// Fields
{
url: {
label: 'URL',
required: true
}
},
// Callback
function (data) {
$.ajax({
url: trumbowyg.o.plugins.noembed.proxy,
type: 'GET',
data: data,
cache: false,
dataType: 'json',
success: trumbowyg.o.plugins.noembed.success || function (data) {
if (data.html) {
trumbowyg.execCmd('insertHTML', data.html);
setTimeout(function () {
trumbowyg.closeModal();
}, 250);
} else {
trumbowyg.addErrorOnModalField(
$('input[type=text]', $modal),
data.error
);
}
},
error: trumbowyg.o.plugins.noembed.error || function () {
trumbowyg.addErrorOnModalField(
$('input[type=text]', $modal),
trumbowyg.lang.noembedError
);
}
});
}
);
}
};
trumbowyg.addBtnDef('noembed', btnDef);
}
}
}
});
})(jQuery);
@@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 72 72">
<path d="M31.5 33.6V25l11 11-11 11v-8.8z"/>
<path d="M64 17v38H8V17h56m8-8H0v54h72V9z"/>
</svg>

After

Width:  |  Height:  |  Size: 165 B