Open elmartino opened 7 years ago
Did you get any solution ?
Nope unfortunately not. I used the non angular2 version of summernote for the time being..
which one ? Can you give me any example ?
Hi, I assume you initialised the ngModel
attribute of the ng2-summernote
component with an empty string (i.e. ''
)?
If that's the case, it seems like the condition on this line treats the empty string as a falsy value so the editor is not rendered.
A workaround for this is initialising the ngModel
attribute of the ng2-summernote
component with a truthy empty string by using new String('')
instead of just ''
.
Hope this helps.
@martinsvb Do you have any plans to update this ?
yes there is a bug in writeValue(value: any) method. Instead of if (value) { ... } should be if (value !== 'undefined' && value !== null) { ... }
I think you can kindly use if (!!value) {} But, I didn't support this package. Can somebody make PR?
Thank you
No (!!value) will not work because empty string will still give false. I will do PR with pleasure.
Hi,
I followed the readme, got no errors, but summernote is not showing up. Only thing created is an empty
<div class="summernote"></div>
inside the<ng2-summernote>
.Any ideas? Thanks!