如何在 tinyMCE 活动编辑器弹出窗口中的自定义按钮上应用 CSS [英] How to apply CSS on custom buttons in tinyMCE active editor popup

查看:16
本文介绍了如何在 tinyMCE 活动编辑器弹出窗口中的自定义按钮上应用 CSS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的 tinyMCE 活动编辑器弹出窗口中添加自定义 CSS,附上屏幕截图供您参考.

I want to add custom CSS in my tinyMCE active editor popup, attaching the screenshot for your reference.

以下是参考代码:

tinymce.activeEditor.windowManager.open({
title: 'Browse Image Gallery',
    file: "data/get_images_tiny.php",
        width: 500,
        height: 305,
        resizable: "no",
        inline: "yes",
        close_previous: "no",
        buttons: [{
            text: 'Upload Image from your PC',
            onclick: function () {
            //do something               
            }
        }, {
            text: 'Close',
            onclick: 'close'
            }]
        }
});

推荐答案

你可以这样使用:

tinyMCE.activeEditor.windowManager.open({
    file : "data/get_images_tiny.php",
    title : 'Browse Image Gallery',
    width: 500,
    height: 305,
    resizable: "no",
    inline: "yes",
    close_previous: "no",
    buttons: [{
          text: 'Insert',
          classes: 'widget btn primary first abs-layout-item',
          onclick: 'close',
          id: 'insertButton'
      }, {
          text: 'Close',
          onclick: 'close',
      }]
});

这篇关于如何在 tinyMCE 活动编辑器弹出窗口中的自定义按钮上应用 CSS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆