Skip to content
Snippets Groups Projects
Commit c5687269 authored by chris's avatar chris
Browse files

add node attrs

parent cd7282bc
No related branches found
No related tags found
1 merge request!307Answer nodeview
...@@ -54,7 +54,7 @@ const Editors = () => { ...@@ -54,7 +54,7 @@ const Editors = () => {
case 'ncbi': case 'ncbi':
break; break;
default: default:
return <Editoria />; return <HHMI />;
} }
}; };
......
...@@ -24,15 +24,16 @@ class MultipleChoiceQuestionService extends Service { ...@@ -24,15 +24,16 @@ class MultipleChoiceQuestionService extends Service {
createNode({ createNode({
question_wrapper: { question_wrapper: {
attrs: {
id: { default: '' },
class: { default: 'mutiple-choice' },
},
group: 'block', group: 'block',
atom: true, atom: true,
content: 'inline*', content: 'inline*',
attrs: {
class: { default: 'paragraph' },
},
parseDOM: [ parseDOM: [
{ {
tag: 'p.question', tag: 'p.mutiple-choice',
getAttrs(dom) { getAttrs(dom) {
return { return {
id: dom.dataset.id, id: dom.dataset.id,
......
const multipleChoiceNode = { const multipleChoiceNode = {
attrs: {
id: { default: '' },
correct: { default: false },
feedback: { default: false },
},
group: 'inline', group: 'inline',
content: 'block*', content: 'block*',
inline: true, inline: true,
// atom: true, // atom: true,
attrs: {
id: { default: '' },
},
toDOM: node => ['multiple-choice', node.attrs, 0], toDOM: node => ['multiple-choice', node.attrs, 0],
parseDOM: [ parseDOM: [
{ {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment