surveyjs - 无法在 Surveyjs 的 Markdown Radiogroup 中的“其他(描述)”复选框中添加 svg 图标
问题描述
questions: [
{
"type": "radiogroup",
"hasOther": true,
"isRequired": true,
"name": "favoritePet",
"title": "What is your favorite pet ![A parrot](https://surveyjs.io/Content/Images/examples/markdown/image_16x16.svg =16x16) ?",
"choices": [
{
"value": "dog",
"text": "Dog: ![A dog](https://surveyjs.io/Content/Images/examples/markdown/dog.svg =14x14)"
}, {
"value": "cat",
"text": "Cat: ![A cat](https://surveyjs.io/Content/Images/examples/markdown/cat.svg =14x14)"
}, {
"value": "parrot",
"text": "Parrot ![A parrot](https://surveyjs.io/Content/Images/examples/markdown/parrot.svg =14x14)"
}
]
}
]
无法在 hasOther 中添加图标,在文档中它显示了选项中显示的图标,但未显示如何在其他(描述)选项中添加图标。 https://www.surveyjs.io/Examples/Library/?id=survey-markdown-radiogroup
解决方案
您需要设置otherText
属性:
{
"type": "radiogroup",
"hasOther": true,
"isRequired": true,
"name": "favoritePet",
"otherText": "Custom other text with an image ![A parrot](https://surveyjs.io/Content/Images/examples/markdown/image_16x16.svg =16x16)",
"title": "What is your favorite pet ![A parrot](https://surveyjs.io/Content/Images/examples/markdown/image_16x16.svg =16x16) ?",
"choices": [
{
"value": "dog",
"text": "Dog: ![A dog](https://surveyjs.io/Content/Images/examples/markdown/dog.svg =14x14)"
}, {
"value": "cat",
"text": "Cat: ![A cat](https://surveyjs.io/Content/Images/examples/markdown/cat.svg =14x14)"
}, {
"value": "parrot",
"text": "Parrot ![A parrot](https://surveyjs.io/Content/Images/examples/markdown/parrot.svg =14x14)"
}
]
}
这是工作 plunker 示例 - https://plnkr.co/edit/9LgRCEpWr2b8LGU1
推荐阅读
- json - react axios post 以数组格式生成 json。如何将其转换为“名称”:“值”类型格式
- python - 为什么我们在输入前使用下划线(_)并在此 python 代码中随机使用?
- ckeditor - CK 编辑器 - 粘贴来自 MS Word 的隐藏文本
- android - CallScreeningService 中的 onScreenCall() 方法未被调用,我希望此函数获取调用详细信息
- c# - 如何使用 Visual Studio 为 .net 框架 4.7.2 项目创建 SDK 样式项目?
- botframework - 如何在自适应卡片中放置可操作的图标
- excel - Excel 中的可搜索下拉列表
- elasticsearch - 如何将复合聚合与单个存储桶一起使用
- cocoapods - VialerPJSIP PJSIP “Pods-”目标具有传递依赖关系,包括静态链接的二进制文件:
- autohotkey - 如何在自动热键中重新映射 alt+tab?