diff --git a/lms/hooks.py b/lms/hooks.py index 81783b67..1a4c774a 100644 --- a/lms/hooks.py +++ b/lms/hooks.py @@ -232,7 +232,8 @@ lms_markdown_macro_renderers = { "Quiz": "lms.plugins.quiz_renderer", "YouTubeVideo": "lms.plugins.youtube_video_renderer", "Video": "lms.plugins.video_renderer", - "Assignment": "lms.plugins.assignment_renderer" + "Assignment": "lms.plugins.assignment_renderer", + "Image": "lms.plugin.image_renderer" } # page_renderer to manage profile pages diff --git a/lms/lms/md.py b/lms/lms/md.py index b02ed68f..99bea3d3 100644 --- a/lms/lms/md.py +++ b/lms/lms/md.py @@ -25,6 +25,7 @@ import html as HTML def markdown_to_html(text): """Renders markdown text into html. """ + print(text) return markdown.markdown(text, extensions=['fenced_code', MacroExtension()]) def find_macros(text): @@ -105,7 +106,7 @@ def sanitize_html(html, macro): any broken tags. This makes sures that all those things are fixed before passing to the etree parser. """ - soup = BeautifulSoup(html, features="lxml") + soup = BeautifulSoup(html, features="html5lib") nodes = soup.body.children classname = "" if macro == "YouTubeVideo": diff --git a/lms/lms/web_form/lesson/lesson.json b/lms/lms/web_form/lesson/lesson.json index 2c519587..210a830a 100644 --- a/lms/lms/web_form/lesson/lesson.json +++ b/lms/lms/web_form/lesson/lesson.json @@ -16,12 +16,12 @@ "docstatus": 0, "doctype": "Web Form", "idx": 0, - "introduction_text": "
Create lessons for your course. You can add some additional content to the lesson using a special syntax. The table below mentions all types of dynamic content that you can add to the lessons and the syntax for the same.
| Content Type | Syntax |
| Video | {{ Video(\"url_of_source\") }} |
| YouTube Video | {{ YouTubeVideo(\"unique_embed_id\") }} |
| Exercise | {{ Exercise(\"exercise_name\") }} |
| Quiz | {{ Quiz(\"lms_quiz_name\") }} |
| Assignment | {{ Assignment(\"id-filetype\") }} |
Create lessons for your course. For adding content, use markdown syntax. You can add some additional content to the lesson using a special syntax. The table below mentions all types of dynamic content that you can add to the lessons and the syntax for the same.
| Content Type | Syntax |
| Video | {{ Video(\"url_of_source\") }} |
| YouTube Video | {{ YouTubeVideo(\"unique_embed_id\") }} |
| Exercise | {{ Exercise(\"exercise_name\") }} |
| Quiz | {{ Quiz(\"lms_quiz_name\") }} |
| Assignment | {{ Assignment(\"id-filetype\") }} |