admin管理员组文章数量:1023083
I am using Magnific Popup for an image gallery. However, the counter is displaying the HTML tags as plain text on the frontend.
Here is my configuration:
$(".open-popup").magnificPopup({
type: "image",
fixedContentPos: true,
gallery: {
enabled: true,
tCounter: '<span class="mfp-counter">%curr% of %total%</span>',
},
});
With the above configuration, the counter is showing the tag as plain text instead of rendering it properly.
Here is the CodePen link for reference:
I am using Magnific Popup for an image gallery. However, the counter is displaying the HTML tags as plain text on the frontend.
Here is my configuration:
$(".open-popup").magnificPopup({
type: "image",
fixedContentPos: true,
gallery: {
enabled: true,
tCounter: '<span class="mfp-counter">%curr% of %total%</span>',
},
});
With the above configuration, the counter is showing the tag as plain text instead of rendering it properly.
Here is the CodePen link for reference: https://codepen.io/swaranan/pen/PwYwoXK
Share Improve this question asked Nov 28, 2024 at 10:13 Swaranan Singha BarmanSwaranan Singha Barman 3471 silver badge15 bronze badges1 Answer
Reset to default 1You need to set the allowHTMLInTemplate
option to true
.
allowHTMLInTemplate
falseAvailable since 1.2.0. Allows HTML content in the source template (such as text under image). If you enable this - make sure your HTML attributes are sanitized if they can be created by a non-admin user.
I am using Magnific Popup for an image gallery. However, the counter is displaying the HTML tags as plain text on the frontend.
Here is my configuration:
$(".open-popup").magnificPopup({
type: "image",
fixedContentPos: true,
gallery: {
enabled: true,
tCounter: '<span class="mfp-counter">%curr% of %total%</span>',
},
});
With the above configuration, the counter is showing the tag as plain text instead of rendering it properly.
Here is the CodePen link for reference:
I am using Magnific Popup for an image gallery. However, the counter is displaying the HTML tags as plain text on the frontend.
Here is my configuration:
$(".open-popup").magnificPopup({
type: "image",
fixedContentPos: true,
gallery: {
enabled: true,
tCounter: '<span class="mfp-counter">%curr% of %total%</span>',
},
});
With the above configuration, the counter is showing the tag as plain text instead of rendering it properly.
Here is the CodePen link for reference: https://codepen.io/swaranan/pen/PwYwoXK
Share Improve this question asked Nov 28, 2024 at 10:13 Swaranan Singha BarmanSwaranan Singha Barman 3471 silver badge15 bronze badges1 Answer
Reset to default 1You need to set the allowHTMLInTemplate
option to true
.
allowHTMLInTemplate
falseAvailable since 1.2.0. Allows HTML content in the source template (such as text under image). If you enable this - make sure your HTML attributes are sanitized if they can be created by a non-admin user.
本文标签: Magnific popup printing tags in sprintStack Overflow
版权声明:本文标题:Magnific popup printing tags in sprint - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745516124a2154062.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论