mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-11 07:34:41 +08:00
Merge branch 'rich-text-formatting' of https://github.com/biosistemika/scinote-web into zd_SCI_687
This commit is contained in:
commit
da54d779ec
3 changed files with 6 additions and 5 deletions
|
@ -60,7 +60,7 @@ function importProtocolFromFile(
|
|||
// Populate values in the template
|
||||
if (values !== null) {
|
||||
_.each(values, function(val, key) {
|
||||
template.find("[data-val='" + key + "']").text(val);
|
||||
template.find("[data-val='" + key + "']").append(val);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -134,7 +134,7 @@ function importProtocolFromFile(
|
|||
var stepGuid = node.attr("guid");
|
||||
var stepPosition = String(Number.parseInt(node.attr("position")) + 1);
|
||||
var stepName = node.children("name").text();
|
||||
var stepDescription = node.children("description").text();
|
||||
var stepDescription = $(node.children("description")).html();
|
||||
|
||||
// Generate step element
|
||||
var stepEl = newPreviewElement(
|
||||
|
@ -431,7 +431,7 @@ function importProtocolFromFile(
|
|||
stepJson.id = stepId;
|
||||
stepJson.position = $(this).attr("position");
|
||||
stepJson.name = $(this).children("name").text();
|
||||
stepJson.description = $(this).children("description").text();
|
||||
stepJson.description = $(this).children("description").html();
|
||||
|
||||
// Iterate through assets
|
||||
var stepAssetsJson = [];
|
||||
|
|
|
@ -53,7 +53,8 @@ module ProtocolsImporter
|
|||
protocol_json['steps'].values.each do |step_json|
|
||||
step = Step.create!(
|
||||
name: step_json["name"],
|
||||
description: step_json["description"],
|
||||
description: # Sanitize description HTML
|
||||
ActionController::Base.helpers.sanitize(step_json['description']),
|
||||
position: step_pos,
|
||||
completed: false,
|
||||
user: user,
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<br>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" role="tabpanel">
|
||||
<span data-val="description" class="ql-editor"></span>
|
||||
<div data-val="description" class="ql-editor"></div>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div data-toggle="tables" class="col-xs-12">
|
||||
|
|
Loading…
Add table
Reference in a new issue