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,104 @@
/* ===========================================================
* trumbowyg.ruby.js v1.0
* Ruby text plugin for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Fathi Anshory (0x00000F5C)
* Twitter : @fscchannl
* Comment : Since I use trumbowyg in my project and required it to insert ruby text, so I thought I can contribute a little. :D
*/
(function ($) {
'use strict';
$.extend(true, $.trumbowyg, {
langs: {
// jshint camelcase:false
en: {
ruby: 'Add ruby text',
rubyModal: 'Ruby modal',
rubyText: 'Ruby text'
},
da: {
ruby: 'Tilføj ruby tekst',
rubyModal: 'Ruby modal',
rubyText: 'Ruby tekst'
},
et: {
ruby: 'Lisa ruby tekst',
rubyModal: 'Ruby modaal',
rubyText: 'Ruby tekst'
},
fr: {
ruby: 'Ajouter du texte ruby',
rubyModal: 'Modale ruby',
rubyText: 'Texte ruby'
},
hu: {
ruby: 'Ruby szöveg hozzáadás',
rubyModal: 'Ruby modal',
rubyText: 'Ruby szöveg'
},
id: {
ruby: 'Sisipkan teks ruby',
rubyModal: 'Modal teks ruby',
rubyText: 'Teks ruby'
},
ko: {
ruby: '루비 문자 넣기',
rubyModal: '대상 문자',
rubyText: '루비 문자'
},
pt_br: {
ruby: 'Adicionar texto ruby',
rubyModal: 'Modal ruby',
rubyText: 'Texto ruby'
},
tr: {
ruby: 'Ruby metni ekle',
rubyModal: 'Ruby modal',
rubyText: 'Ruby metni'
},
zh_tw: {
ruby: '加入 ruby 文字',
rubyModal: 'Ruby 彈跳視窗',
rubyText: 'Ruby 文字'
},
// jshint camelcase:true
},
plugins: {
ruby: {
init: function (trumbowyg) {
var btnDef = {
fn: function () {
trumbowyg.saveRange();
trumbowyg.openModalInsert(
trumbowyg.lang.ruby,
{
rubyText: {
label: trumbowyg.lang.rubyText,
required: false,
},
modal: {
label: trumbowyg.lang.rubyModal,
value: trumbowyg.getRangeText(),
required: true
}
},
function (v) {
var node = $('<ruby title="' + v.rubyText + '">' + v.modal + '<rp> (</rp><rt>' + v.rubyText + '</rt><rp>)</rp></ruby>')[0];
trumbowyg.range.deleteContents();
trumbowyg.range.insertNode(node);
trumbowyg.syncCode();
trumbowyg.$c.trigger('tbwchange');
return true;
}
);
}
};
trumbowyg.addBtnDef('ruby', btnDef);
}
}
}
});
})(jQuery);
@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 72 72">
<path d="M16.499 24.477h8.018L41.08 67.5H33l-4.04-11.361H11.804L7.764 67.5H0l16.499-43.023zm-2.65 25.907h13.127l-6.438-18.497h-.177l-6.512 18.497zM65.053 16.685c-6.316 1.178-12.025 1.98-17.126 2.408a362.385 362.385 0 00-.965 5.833c-.25 1.57-.679 3.907-1.286 7.013 3.033-1.963 5.852-3.266 8.458-3.907 2.639-.642 4.905-.891 6.797-.75 1.891.108 3.746.661 5.566 1.661 1.82.964 3.264 2.408 4.334 4.334 1.104 1.893 1.427 4.088.965 6.584-.466 2.461-1.554 4.494-3.265 6.101-1.679 1.605-3.658 2.783-5.941 3.532-2.283.785-4.853 1.251-7.707 1.391-2.819.144-5.906.161-9.259.056 0-1.642-.287-3.212-.857-4.71l.108-.59c2.711.5 5.246.768 7.601.802 2.39 0 4.529-.195 6.421-.589 1.927-.393 3.605-1.069 5.031-2.031 1.427-.965 2.319-2.319 2.676-4.067.394-1.75.269-3.229-.373-4.443-.644-1.249-1.446-2.213-2.408-2.891-.929-.68-2.161-1.034-3.693-1.071-1.536-.072-3.265.089-5.192.482-1.927.391-3.82 1.14-5.672 2.248a24.308 24.308 0 00-4.978 3.907l-4.872-1.981c1.463-5.031 2.355-8.597 2.677-10.703.321-2.105.642-4.067.963-5.887-3.961.25-7.154.411-9.58.481-.215-1.927-.52-3.534-.91-4.817l.32-.32c3.604.32 7.225.446 10.865.375.214-1.355.481-3.103.804-5.245.354-2.175.407-3.621.16-4.336.034-.784.374-1.017 1.017-.695l5.085.749c.428.251.444.573.055.964l-.857.91c-.537 2.89-.981 5.352-1.338 7.385 4.279-.427 9.312-1.393 15.092-2.89l1.284 4.707"/>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB