简体   繁体   English

TinyMCE带有列表的弹出窗口

[英]TinyMCE popup window with list

I have a TinyMCE editor in my custom CMS. 我的自定义CMS中有一个TinyMCE编辑器。 I'd like to add a custom button on my toolbar on which when the user clicks, a window pops up with a list of elements. 我想在工具栏上添加一个自定义按钮,当用户单击该按钮时,将弹出一个窗口,其中包含元素列表。 Then the user can select an element and by pressing the OK button the window closes and copies the text of the selected element into the textarea at the current position of the cursor. 然后,用户可以选择一个元素,然后按“确定”按钮,窗口将关闭,并将所选元素的文本复制到光标当前位置的文本区域中。 I have find lots of examples but neither of them worked. 我找到了很多示例,但都没有用。 I'd like to ask some help. 我想寻求帮助。

I'm having the same problem, I found this : 我遇到了同样的问题,我发现了这个问题:

how to add tinymce listbox values in windowmanager 如何在windowmanager中添加tinymce列表框值

From the selected answer: 从所选答案中:

{type: 'listbox', 
    name: 'align', 
    label: 'align', 
    'values': [
        {text: 'Left', value: 'left'},
        {text: 'Right', value: 'right'},
        {text: 'Center', value: 'center'}
    ]
}

I hope this helped ! 希望对您有所帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM