BUG: this.get('content') returns empty string when trying to add custom component type
See original GitHub issueVersion: 0.16.18
Are you able to reproduce the bug from the demo?
[ X ] Yes [ ] No
What is the expected behavior? Expecting this.get(‘content’) in the context of the model while creating a new component type (extending the default component type) should return the children as HTML.
Describe the bug detailed
Not sure if it’s a but or I’m doing something wrong however in all of the examples I’ve come across in other issues it seems like this.get('content')
should return it’s children’s HTML but instead it returns an empty string.
What is the current behavior? It only returns the text content in the component if there is any but if there are children components it will not return them.
Are you able to attach screenshots, screencasts or a live demo?
[ X ] Yes (attach) [ ] No
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (5 by maintainers)
No,
content
property is only used in components like Text/Textnode. Replace yourthis.get('content')
withthis.components().map(comp => comp.toHTML())
Thank you!