feat: text editor for description
This commit is contained in:
12
lms/patches/v0_0/convert_course_description_to_html.py
Normal file
12
lms/patches/v0_0/convert_course_description_to_html.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import frappe
|
||||
from lms.lms.md import markdown_to_html
|
||||
|
||||
|
||||
def execute():
|
||||
courses = frappe.get_all("LMS Course", fields=["name", "description"])
|
||||
|
||||
for course in courses:
|
||||
html = markdown_to_html(course.description)
|
||||
frappe.db.set_value("LMS Course", course.name, "description", html)
|
||||
|
||||
frappe.reload_doc("lms", "doctype", "lms_course")
|
||||
Reference in New Issue
Block a user