@@ -11,7 +11,7 @@ if (hpList === undefined) hpList = {};
1111
1212import "./horizontal-parsons.js" ;
1313
14- export default class SQLHParons extends RunestoneBase {
14+ export default class SQLHParsons extends RunestoneBase {
1515 constructor ( opts ) {
1616 super ( opts ) ;
1717 // copied from activecode
@@ -75,6 +75,7 @@ export default class SQLHParons extends RunestoneBase {
7575
7676 // copied from activecode, already modified to add parsons
7777 createEditor ( ) {
78+ console . log ( 'test create editor hparsons' )
7879 this . outerDiv = document . createElement ( "div" ) ;
7980 $ ( this . origElem ) . replaceWith ( this . outerDiv ) ;
8081 let parsonsHTML = `<horizontal-parsons id='${ this . divid } -hparsons'` ;
@@ -159,6 +160,7 @@ export default class SQLHParons extends RunestoneBase {
159160 }
160161}
161162
163+
162164/*=================================
163165== Find the custom HTML tags and ==
164166== execute our code on them ==
@@ -168,7 +170,7 @@ $(document).on("runestone:login-complete", function () {
168170 if ( $ ( this ) . closest ( "[data-component=timedAssessment]" ) . length == 0 ) {
169171 // If this element exists within a timed component, don't render it here
170172 // try {
171- hpList [ this . id ] = new SQLHParons ( {
173+ hpList [ this . id ] = new SQLHParsons ( {
172174 orig : this ,
173175 useRunestoneServices : eBookConfig . useRunestoneServices ,
174176 } ) ;
@@ -179,3 +181,10 @@ $(document).on("runestone:login-complete", function () {
179181 }
180182 } ) ;
181183} ) ;
184+
185+ if ( typeof window . component_factory === "undefined" ) {
186+ window . component_factory = { } ;
187+ }
188+ window . component_factory [ "hparsons" ] = function ( opts ) {
189+ return new SQLHParsons ( opts ) ;
190+ } ;
0 commit comments