Использование HTML в YML дает [Объект Objcet]
YML
context:
fieldLabel: |
<strong>
Some Bold Text
</strong> and now normal continued.
Это отображается как
context:
fieldLabel: ",[object Object], and now normal continued.↵"
, но я хочу, чтобы мой вывод был
context: { fieldLabel: '<strong>\n Some Bold Text\n</strong> and now normal continued.\n' },
Мой код JS:
Мой код JS:
const tests = YAML.safeLoad(this.props.children,{json:true});
console.log("tests",...tests)
Выход на консоль:
context:
fieldLabel: ",[object Object], and now normal continued.↵"
Он приходит как [объект объекта] вместо <strong>\n Some Bold Text\n</strong>