Skip to content

Commit

Permalink
fix: rebase mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
Chrysalis-B committed Sep 27, 2024
1 parent 4e66273 commit 4c76d8a
Showing 1 changed file with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,26 +38,21 @@ function EditableGradingInstruction({ element }: { element: Element }) {
nodes: baseSchema.spec.nodes
.append(formulaSchema)
.append(tableSchema)
.append(spanWithNowrap)
.update('image', imageInputSchema(resolveAttachment)),
marks: baseSchema.spec.marks
marks: baseSchema.spec.marks.append(spanWithNowrap)
})

const outputSchema = new Schema({
nodes: baseSchema.spec.nodes
.append(formulaOutputSchema)
.append(tableSchema)
.append(spanWithNowrap)
.update('image', imageOutputSchema),
marks: baseSchema.spec.marks
nodes: baseSchema.spec.nodes.append(formulaOutputSchema).append(tableSchema).update('image', imageOutputSchema),
marks: baseSchema.spec.marks.append(spanWithNowrap)
})

const doc = ProseDOMParser.fromSchema(inputSchema).parse(element)
const [mount, setMount] = useState<HTMLElement | null>(null)
const [formulaState, setFormulaState] = useState<FormulaEditorState | null>(null)
const formulaPlugin = new FormulaPlugin(setFormulaState)
const [state, setState] = useState(
EditorState.create({ schema: inputSchema, doc, plugins: [keymap(baseKeymap), formulaPlugin] })
EditorState.create({ schema: inputSchema, doc, plugins: [keymap(baseKeymap), formulaPlugin, nbspPlugin] })
)

return (
Expand Down

0 comments on commit 4c76d8a

Please sign in to comment.