diff --git a/src/components/CollectionEditor.tsx b/src/components/CollectionEditor.tsx index 8588d68..3552c1f 100644 --- a/src/components/CollectionEditor.tsx +++ b/src/components/CollectionEditor.tsx @@ -74,6 +74,10 @@ const CollectionEditor: React.FC = () => { }, config: { mode: mode || "edit", // edit / review / read / sourcingReview + userSpecificFrameworkField: { + code: "board", + value: localStorage.getItem('userSpecificBoard') ? localStorage.getItem('userSpecificBoard') : [] + }, maxDepth: 4, objectType: "Collection", primaryCategory: "Course", // Professional Development Course, Curriculum Course @@ -150,6 +154,8 @@ const CollectionEditor: React.FC = () => { }, }; + console.log('editorConfig ====>', editorConfig) + const editorRef = useRef(null); const isAppendedRef = useRef(false); const [assetsLoaded, setAssetsLoaded] = useState(false); @@ -162,7 +168,7 @@ const CollectionEditor: React.FC = () => { script.id = "collection-editor-js"; script.src = - "https://cdn.jsdelivr.net/npm/@tekdi/sunbird-collection-editor-web-component@6.1.0-beta.1/sunbird-collection-editor.js"; + "https://cdn.jsdelivr.net/npm/@tekdi/sunbird-collection-editor-web-component@6.1.0-beta.2/sunbird-collection-editor.js"; script.async = true; script.onload = () => setAssetsLoaded(true); document.body.appendChild(script); @@ -177,7 +183,7 @@ const CollectionEditor: React.FC = () => { link.id = "collection-editor-css"; link.rel = "stylesheet"; link.href = - "https://cdn.jsdelivr.net/npm/@tekdi/sunbird-collection-editor-web-component@6.1.0-beta.1/styles.css"; + "https://cdn.jsdelivr.net/npm/@tekdi/sunbird-collection-editor-web-component@6.1.0-beta.2/styles.css"; document.head.appendChild(link); } diff --git a/src/components/QuestionSetEditor.tsx b/src/components/QuestionSetEditor.tsx index f05a9b9..c9c1cf1 100644 --- a/src/components/QuestionSetEditor.tsx +++ b/src/components/QuestionSetEditor.tsx @@ -82,6 +82,10 @@ const QuestionSetEditor: React.FC = () => { }, config: { mode: mode || "edit", + userSpecificFrameworkField: { + code: "board", + value: localStorage.getItem('userSpecificBoard') ? localStorage.getItem('userSpecificBoard') : [] + }, enableQuestionCreation: true, enableAddFromLibrary: true, editableFields: { @@ -137,6 +141,8 @@ const QuestionSetEditor: React.FC = () => { }, }; + console.log('questionSetEditorConfig ====>', questionSetEditorConfig) + const editorRef = useRef(null); const isAppendedRef = useRef(false); const [assetsLoaded, setAssetsLoaded] = useState(false); @@ -148,7 +154,7 @@ const QuestionSetEditor: React.FC = () => { link.id = "sunbird-editor-css"; link.rel = "stylesheet"; link.href = - "https://cdn.jsdelivr.net/npm/@tekdi/sunbird-questionset-editor-web-component@3.0.1/styles.css"; + "https://cdn.jsdelivr.net/npm/@tekdi/sunbird-questionset-editor-web-component@3.0.2/styles.css"; document.head.appendChild(link); } @@ -156,7 +162,7 @@ const QuestionSetEditor: React.FC = () => { const script = document.createElement("script"); script.id = "sunbird-editor-js"; script.src = - "https://cdn.jsdelivr.net/npm/@tekdi/sunbird-questionset-editor-web-component@3.0.1/sunbird-questionset-editor.js"; + "https://cdn.jsdelivr.net/npm/@tekdi/sunbird-questionset-editor-web-component@3.0.2/sunbird-questionset-editor.js"; script.async = true; script.onload = () => setAssetsLoaded(true); document.body.appendChild(script);