How Embed Gist in Wagtail?

时光怂恿深爱的人放手 提交于 2019-12-11 05:26:29

问题


How to insert dynamic gist code in the middle of posts generated by Wagtail (Django Cms)?

I searched the documentation of wagtail but did not find anything that could help me automatically insert the github codes.


回答1:


Gist is one of the built in content types supported by Wagtail's embedded content feature. Within a rich text field, editors can use the 'media' toolbar icon to enter the URL to the Gist page, and it will appear embedded in the rich text content. Within a StreamField, the developer can EmbedBlock to the set of available block types, and the editor will then be able to enter the Gist URL into that field.



来源:https://stackoverflow.com/questions/54723046/how-embed-gist-in-wagtail

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!