无法在 Surveyjs 的 Markdown Radiogroup 中的 "other(describe)" 复选框中添加 svg 图标
Can not add svg icon in "other(describe)" check box in Markdown Radiogroup in Surveyjs
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)"
}
]
}
]
can not add the icon in the hasOther, In documentation it has shown the icon displayed in choices but not show how to add icon in other(describe) choice.
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
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)"
}
]
}
]
can not add the icon in the hasOther, In documentation it has shown the icon displayed in choices but not show how to add icon in other(describe) choice. 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