لم يتم منح أي أوسمة حتى الآن.
عودة
أعلى أسفل
XF.ready(function() { if (!window.tinymce) return; XF.hook('editor:config', function(config) { config.plugins = (config.plugins || '') + ' quickreplies'; config.setup = function(editor) { editor.ui.registry.addMenuButton('quickreplies', { text: '📋 ردود جاهزة', fetch: function(callback) { callback([ // ===== شكر ===== { type: 'menuitem', text: '⭐ شكراً لك على مشاركتك', onAction: () => editor.insertContent('شكراً لك على مشاركتك 🌟') }, { type: 'menuitem', text: '🙏 جزاك الله خيراً', onAction: () => editor.insertContent('جزاك الله خيراً 🙏') }, { type: 'menuitem', text: '👍 بارك الله فيك', onAction: () => editor.insertContent('بارك الله فيك 👍') }, { type: 'separator' }, // ===== إداري ===== { type: 'menuitem', text: '✔️ تم نقل الموضوع', onAction: () => editor.insertContent('تم نقل الموضوع للقسم المناسب ✔️') }, { type: 'menuitem', text: '🛠️ تم التعديل', onAction: () => editor.insertContent('تم التعديل بواسطة الإدارة 🛠️') }, { type: 'menuitem', text: '📌 يرجى الالتزام بالقوانين', onAction: () => editor.insertContent('يرجى الالتزام بقوانين المنتدى 📌') }, { type: 'separator' }, // ===== إضافة للمدير ===== ...(XF.config.user.is_admin ? [{ type: 'menuitem', text: '➕ إضافة رد جديد', onAction: function() { let text = prompt('اكتب الرد الجديد:'); if (text) { editor.insertContent(text); } } }] : []) ]); } }); }; config.toolbar = (config.toolbar || '') + ' | quickreplies'; }); });