@@ -280,7 +280,11 @@ var pageManagementUtils = {
280
280
handleClickDone :function ( ) {
281
281
var selectedType = pageManagementUtils . contentTypeSelect . val ( ) ;
282
282
var selectedTypeText = $ ( "#typeSelect option:selected" ) . text ( ) ;
283
-
283
+ if ( selectedType == "fixedHtml" ) {
284
+ let htmlContent = tinyMCE . get ( "fixedHTMLValue" ) . getContent ( ) ;
285
+ tinyMCE . get ( "fixedHTMLValue" ) . remove ( ) ;
286
+ pageManagementUtils . fixedHTMLSection . find ( "#fixedHTMLValue" ) . val ( htmlContent ) ;
287
+ }
284
288
//Hide all sections
285
289
pageManagementUtils . classGroupSection . hide ( ) ;
286
290
pageManagementUtils . fixedHTMLSection . hide ( ) ;
@@ -368,6 +372,7 @@ var pageManagementUtils = {
368
372
if ( _this . contentTypeSelect . val ( ) == "fixedHtml" ) {
369
373
pageManagementUtils . headerBar . text ( pageManagementUtils . fixedHtml + " - " ) ;
370
374
pageManagementUtils . fixedHTMLSection . show ( ) ;
375
+ initTinyMCE . initEditor ( pageManagementUtils . fixedHTMLSection . find ( "#fixedHTMLValue" ) ) ;
371
376
pageManagementUtils . sparqlQuerySection . hide ( ) ;
372
377
pageManagementUtils . searchIndividualsSection . hide ( ) ;
373
378
}
@@ -473,7 +478,6 @@ var pageManagementUtils = {
473
478
474
479
// Get rid of the cancel link; it'll be replaced by a delete link
475
480
$newContentObj . find ( 'span#cancelContent' + counter ) . html ( '' ) ;
476
-
477
481
if ( contentType == "sparqlQuery" || contentType == "fixedHtml" || contentType == "searchIndividuals" ) {
478
482
varOrClass = $newContentObj . find ( 'input[name="saveToVar"]' ) . val ( ) ;
479
483
}
@@ -521,6 +525,9 @@ var pageManagementUtils = {
521
525
$newDivContainer . appendTo ( $ ( 'section#contentDivs' ) ) ;
522
526
//place new content object
523
527
$newContentObj . prependTo ( $innerDiv ) ;
528
+ $newContentObj . find ( "textarea[name='htmlValue']" ) . each ( function ( ) {
529
+ initTinyMCE . initEditor ( $ ( this ) ) ;
530
+ } ) ;
524
531
} ,
525
532
bindClonedContentDoneEvent :function ( $newContentObj ) {
526
533
//Done button should just collapse the cloned content
0 commit comments