mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-02 21:51:51 +08:00
Merge pull request #1739 from aignatov-bio/ai-sci-3425-add-smart-annotation-to-protocol-description
Fix smart annotation in protocols in repository [SCI-3425]
This commit is contained in:
commit
3bb268459f
1 changed files with 8 additions and 3 deletions
|
@ -3,6 +3,9 @@ class ProtocolsController < ApplicationController
|
|||
include RenamingUtil
|
||||
include ProtocolsImporter
|
||||
include ProtocolsExporter
|
||||
include ActionView::Helpers::TextHelper
|
||||
include ActionView::Helpers::UrlHelper
|
||||
include ApplicationHelper
|
||||
include InputSanitizeHelper
|
||||
include ProtocolsIoHelper
|
||||
include TeamsHelper
|
||||
|
@ -222,9 +225,11 @@ class ProtocolsController < ApplicationController
|
|||
if @protocol.update(description: params.require(:protocol)[:description])
|
||||
TinyMceAsset.update_images(@protocol, params[:tiny_mce_images])
|
||||
render json: {
|
||||
html: sanitize_input(
|
||||
@protocol.tinymce_render(:description)
|
||||
)
|
||||
html: custom_auto_link(
|
||||
@protocol.tinymce_render(:description),
|
||||
simple_format: false,
|
||||
tags: %w(img),
|
||||
team: current_team)
|
||||
}
|
||||
else
|
||||
render json: @protocol.errors, status: :unprocessable_entity
|
||||
|
|
Loading…
Reference in a new issue