BorisMoore / jsviews

Interactive data-driven views, MVVM and MVP, built on top of JsRender templates
http://www.jsviews.com/#jsviews
MIT License
856 stars 130 forks source link

html output #387

Closed Mytia closed 7 years ago

Mytia commented 7 years ago

Sometimes users insert not good, but valid html texts from wysiwyg editors, but jsviews can't show it.. Is it possible to output it without error?

https://jsfiddle.net/nq4372t8/20/

BorisMoore commented 7 years ago

You can use $.views.settings.advanced({noValidate: true}); to skip the validation:

http://www.jsviews.com/#jsvsettings/advanced

See https://jsfiddle.net/BorisMoore/nq4372t8/21/

BTW you would be better with a type attribute on the <script> tag for the template, otherwise the browser tries to run the template markup as JavaScript when the page loads, which may have undesirable side-effects. <script id="tmpl" type="text/x-jsrender">

Mytia commented 7 years ago

Thanks, It's working.