السلام عليكم ورحمة الله تعالى وبركاته أريد كود كنت ابحث عنه من مدة وهو كود اضافة خطوط الكتابة لصندوق الردوالمواضيعلاننا سئمنا من الخطوط نفسها في كل منتدى ولطالما اابحث عنه اجد نفس الكود يتم اضافة اسم الخط ولكن لايعمل
ضع الكود التالي في قالب الـ overall_footer_endابحث عن </body>ضع اعلاها الكود التاليالكود:<script type="text/javascript">//<![CDATA[$(function() { $(function() { $('.sceditor-button-font').click(function() { addFont('Cairo'); addFont('Amiri'); addFont('Changa'); addFont('Harmattan'); addFont('Katibeh'); addFont('Lalezar'); $('.sceditor-font-option.new-font').click(function(e) { $('#text_editor_textarea').sceditor('instance').insertText('[font=' + $(this).attr('data-font') + ']', '[/font]'); $('.sceditor-font-picker').remove(); e.preventDefault() }) }); function addFont(font) { $('.sceditor-font-picker div').append('<a unselectable="on" class="sceditor-font-option new-font" href="#" data-font="' + font + '"><font unselectable="on" face="' + font + '">' + font + '</font></a>') } $(function() { $('head').append('<link href="https://fonts.googleapis.com/css2?family=Cairo:wght@200;300;400;600;700;900&display=swap" rel="stylesheet">'); $('head').append('<link href="https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet">'); $('head').append('<link href="https://fonts.googleapis.com/css2?family=Changa:wght@200;300;400;500;600;700&display=swap" rel="stylesheet">'); $('head').append('<link href="https://fonts.googleapis.com/css2?family=Harmattan&display=swap" rel="stylesheet">'); $('head').append('<link href="https://fonts.googleapis.com/css2?family=Lalezar&display=swap" rel="stylesheet">'); $('head').append('<link href="https://fonts.googleapis.com/css2?family=Katibeh&display=swap" rel="stylesheet">'); }) })});//]]></script>
Cairo-Amiri-Changa-Harmattan-Lalezar-Katibeh
ابحث عن
</body>
ضع اعلاها الكود التالي
الكود:
<script type="text/javascript">
//<![CDATA[
$(function() {
$(function() {
$('.sceditor-button-font').click(function() {
addFont('Cairo');
addFont('Amiri');
addFont('Changa');
addFont('Harmattan');
addFont('Katibeh');
addFont('Lalezar');
$('.sceditor-font-option.new-font').click(function(e) {
$('#text_editor_textarea').sceditor('instance').insertText('[font=' + $(this).attr('data-font') + ']', '[/font]');
$('.sceditor-font-picker').remove();
e.preventDefault()
})
});
function addFont(font) {
$('.sceditor-font-picker div').append('<a unselectable="on" class="sceditor-font-option new-font" href="#" data-font="' + font + '"><font unselectable="on" face="' + font + '">' + font + '</font></a>')
}
$(function() {
$('head').append('<link href="https://fonts.googleapis.com/css2?family=Cairo:wght@200;300;400;600;700;900&display=swap" rel="stylesheet">');
$('head').append('<link href="https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet">');
$('head').append('<link href="https://fonts.googleapis.com/css2?family=Changa:wght@200;300;400;500;600;700&display=swap" rel="stylesheet">');
$('head').append('<link href="https://fonts.googleapis.com/css2?family=Harmattan&display=swap" rel="stylesheet">');
$('head').append('<link href="https://fonts.googleapis.com/css2?family=Lalezar&display=swap" rel="stylesheet">');
$('head').append('<link href="https://fonts.googleapis.com/css2?family=Katibeh&display=swap" rel="stylesheet">');
})
})
});
//]]>
</script>