feat: text editor for description

This commit is contained in:
Jannat Patel
2023-04-06 18:01:12 +05:30
parent fafd132768
commit e4b4556210
10 changed files with 35 additions and 26 deletions

View 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")