Updated courses model and fixed rich text editor tool bar drop down problem

This commit is contained in:
2024-10-03 10:28:33 +08:00
parent 42fbcc5d89
commit 68378d55ac
20 changed files with 652 additions and 28 deletions

View File

@@ -36,7 +36,7 @@ export const Route = createFileRoute("/_layout/Courses/AddCourse")({
function AddCourseForms() {
const toolbar = {
options: ['inline', 'blockType', 'fontSize', 'list', 'textAlign', 'history', 'embedded', 'emoji', 'image'],
options: ['inline', 'blockType', 'fontSize', 'list', 'textAlign', 'history', 'embedded', 'emoji',],
inline: { inDropdown: true },
list: { inDropdown: true },
textAlign: { inDropdown: true },
@@ -137,8 +137,8 @@ function AddCourseForms() {
setLongDescriptionEditorState(newState);
setlongDescription(draftToHtml(convertToRaw(newState.getCurrentContent())));
setValue("long_description", longDescription);
}}
toolbar={toolbar}
/>
</FormControl>