Skip to content

Commit

Permalink
SAK-45605 - Using a better way to get fckeditor content so it can be …
Browse files Browse the repository at this point in the history
…submitted. The old way seemed to be getting additional markup that we don't want.

Also, there was an issue actually saving the new syllabus data.  Possibly related to changes that came in with SAK-44784?
  • Loading branch information
maurercw authored and Miguel Pellicer committed Jun 28, 2021
1 parent c1197ac commit e3b44ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ public void updateEntity(EntityReference ref, Object entity, Map<String, Object>
} else {
if (StringUtils.isNotEmpty(cleanedText)) {
data.setAsset(cleanedText);
syllabusManager.saveSyllabus(data);
}
}
}
Expand Down
5 changes: 1 addition & 4 deletions syllabus/syllabus-app/src/webapp/js/syllabus.js
Original file line number Diff line number Diff line change
Expand Up @@ -363,9 +363,6 @@ function doAddItemButtonClick( msgs, published )
}
else
{
// Fetch the content from the new wysiwyg
$("#newContentTextAreaWysiwyg").val($('#newContentDiv').find('iframe').contents().find('body').html()).change();

// ID doesn't exist since we're adding a new one
var id = "0";
params =
Expand All @@ -374,7 +371,7 @@ function doAddItemButtonClick( msgs, published )
"title": title,
"siteId": $("#siteId").val(),
"published": published,
"content": $("#newContentTextAreaWysiwyg").val()
"content": CKEDITOR.instances.newContentTextAreaWysiwyg.getData()
};

postAjax( id, params, msgs );
Expand Down

0 comments on commit e3b44ad

Please sign in to comment.