Types for the editor

TEXT

type : paragraph
content : [ ] this will be an object for contents for the types of text such as if there are two words but each with different marks then there will one more type called as text with again array of marks for that particular content type.
contains: marks [marktype]
marktypes: bold , italic , link , underline , strike , textstyle
markstypes structure : {

type : type name [italic , underline , strike , textstyle,higlight]
attrs : color[rgba format for hightlight ] , color[hex format for text color #9333A]
}

HEADING

type : heading
attrs : level number indicating the level of heading 1,2,3
content : same as text this will be an object for contents for the types of text such as if there are two words but each with different marks then there will one more type called as text with again array of marks for that particular content type.
contains marks : same as text

CALLOUT

type : callout
attrs : {
type : info | warning
icon : megaphone
content : [ ] same as the above two
}

BULLET LIST

type : bulletList
content : [ ] this will be type of listItem with each having a paragraph content type and those list will be type text accordingly with their own marks
also these will have nested types of their own

NUMBERED LIST

type : ordered list
attrs : {
start : 1,
type : null
}

BlockQuote

type : block quote
content : [] paragraph and paragraph has an array of type text and each has their own marks

CODE BLOCK:

type : monacoCodeBlock
attrs : {
language : javascript - > sepecifying the language
}
YOUTUBE:
type : youtube
attrs : {
src : youtube links
start : 0
width : 640
height : 480
}
IMAGE :
type : image
attrs : {
src : link
alt : string image name (Bug when resized the alternative text is disappearing)
title : null
width : null || some number ,
height : null || some number

}
AUDIO / VIDEO / FILE:
type : audio
attrs : {
src : link
title : audio file name
}
TABLE : SOME IN CONSISTENCIESS ARE THERE
MCQ QUESTION
type : mcq-question
arrs : {
question : null if nothing is there in the question text feild
options : [
id : number,
text : option text
correect : boolean true of correct
]
saveToLibrary: false,
aiValidation: false,
assignMarks: false,
marks: 1,
answerRequired: true,
aiAgeGroup: string ,
aiSubjectContext: string ,
aiValidationPrompt: string
}
FILE UPLOAD QUESTION
"type": "file-upload-question",
"attrs": {
"question": "",
"allowedFileTypes": [
"image" // can mutiple allowed file types (image,video,doc,pdf,audio)
],
"uploadLabel": string ,
"saveToLibrary": boolean,
"aiValidation": boolean,
"assignMarks": boolean,
"marks": number,
"answerRequired": boolean,
"aiAgeGroup": string,
"aiSubjectContext": string,
"aiValidationPrompt": string
}

CUSTOM QUESTION

type : custome-question
attrs : [
answers : []
question : string
anwserRequired : string
saveToLibrary : boolean
]

Aswers type :
{
id : unique answer id ,
type : image,video,pdf,text
config : { } -- this changes according to the answer type
}

MCQ : CONFIG
{
options : [
{
id : string ,
text : string ,
correct. boolean
}

]

}

IMAGE / VIDOE / AUDIO / FILE : CONFIG
{
uploadeLabel : string
}

TEXT : CONFIG
{
placeholder : string
}







Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.