Radio buttons acts as Check-box in TinyMce 4

﹥>﹥吖頭↗ 提交于 2019-12-20 05:04:58

问题


Here's the fiddle, the type is radio but acts like check-box

{type: 'radio', name: 'letter', label: 'Letter'},
{type: 'radio', name: 'custom', label: 'Custom'},

I tried using them under one name that didn't work out, and my 2nd question: how to make one of them as default(as selected).


Keep Smiling :)


回答1:


It seems like the tinymce/ui/Radio class is not implemented yet. It act like a tinymce/ui/Checkbox.

You can use the tinymce/ui/ListBox class as a workaround.




回答2:


for the 2nd question: {type: 'radio', name: 'a', label: 'Letter', checked:'checked'}




回答3:


Radio - not implemented yet

See message here: https://github.com/tinymce/tinymce/blob/ca0f454b9001b9f20aa26349b25f6d839c1a1146/js/tinymce/skins/lightgray/Radio.less

and almost empty class Radio.js

https://github.com/tinymce/tinymce/blob/0ab3af181284a060683b566d50e81381cc6445a9/js/tinymce/classes/ui/Radio.js



来源:https://stackoverflow.com/questions/19607598/radio-buttons-acts-as-check-box-in-tinymce-4

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!