mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-08 12:56:27 +08:00
Fix smart anottation to protocols in repository
This commit is contained in:
parent
d08bdd771e
commit
2e6bab4638
1 changed files with 8 additions and 3 deletions
|
@ -3,6 +3,9 @@ class ProtocolsController < ApplicationController
|
||||||
include RenamingUtil
|
include RenamingUtil
|
||||||
include ProtocolsImporter
|
include ProtocolsImporter
|
||||||
include ProtocolsExporter
|
include ProtocolsExporter
|
||||||
|
include ActionView::Helpers::TextHelper
|
||||||
|
include ActionView::Helpers::UrlHelper
|
||||||
|
include ApplicationHelper
|
||||||
include InputSanitizeHelper
|
include InputSanitizeHelper
|
||||||
include ProtocolsIoHelper
|
include ProtocolsIoHelper
|
||||||
include TeamsHelper
|
include TeamsHelper
|
||||||
|
@ -222,9 +225,11 @@ class ProtocolsController < ApplicationController
|
||||||
if @protocol.update(description: params.require(:protocol)[:description])
|
if @protocol.update(description: params.require(:protocol)[:description])
|
||||||
TinyMceAsset.update_images(@protocol, params[:tiny_mce_images])
|
TinyMceAsset.update_images(@protocol, params[:tiny_mce_images])
|
||||||
render json: {
|
render json: {
|
||||||
html: sanitize_input(
|
html: custom_auto_link(
|
||||||
@protocol.tinymce_render(:description)
|
@protocol.tinymce_render(:description),
|
||||||
)
|
simple_format: false,
|
||||||
|
tags: %w(img),
|
||||||
|
team: current_team)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
render json: @protocol.errors, status: :unprocessable_entity
|
render json: @protocol.errors, status: :unprocessable_entity
|
||||||
|
|
Loading…
Add table
Reference in a new issue