Sha256: 4ebfecf671bcf6b143a330fcbca0074eea8e8a1b1604e4aad45a93a11a7890da

Contents?: true

Size: 628 Bytes

Versions: 48

Compression:

Stored size: 628 Bytes

Contents

# frozen_string_literal: true

# == Schema Information
#
# Table name: alchemy_essence_richtexts
#
#  id            :integer          not null, primary key
#  body          :text
#  stripped_body :text
#  public        :boolean
#  created_at    :datetime         not null
#  updated_at    :datetime         not null
#

module Alchemy
  class EssenceRichtext < BaseRecord
    acts_as_essence preview_text_column: "stripped_body"

    before_save :strip_content

    def has_tinymce?
      true
    end

    private

    def strip_content
      self.stripped_body = Rails::Html::FullSanitizer.new.sanitize(body)
    end
  end
end

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
alchemy_cms-5.3.8 app/models/alchemy/essence_richtext.rb
alchemy_cms-5.3.7 app/models/alchemy/essence_richtext.rb
alchemy_cms-5.3.6 app/models/alchemy/essence_richtext.rb
alchemy_cms-5.3.5 app/models/alchemy/essence_richtext.rb
alchemy_cms-5.3.4 app/models/alchemy/essence_richtext.rb
alchemy_cms-5.3.3 app/models/alchemy/essence_richtext.rb
alchemy_cms-5.3.2 app/models/alchemy/essence_richtext.rb
alchemy_cms-5.3.1 app/models/alchemy/essence_richtext.rb
alchemy_cms-5.3.0 app/models/alchemy/essence_richtext.rb
alchemy_cms-5.2.7 app/models/alchemy/essence_richtext.rb
alchemy_cms-5.2.6 app/models/alchemy/essence_richtext.rb
alchemy_cms-5.1.10 app/models/alchemy/essence_richtext.rb
alchemy_cms-5.0.10 app/models/alchemy/essence_richtext.rb
alchemy_cms-5.2.5 app/models/alchemy/essence_richtext.rb
alchemy_cms-5.1.9 app/models/alchemy/essence_richtext.rb
alchemy_cms-5.0.9 app/models/alchemy/essence_richtext.rb
alchemy_cms-5.2.4 app/models/alchemy/essence_richtext.rb
alchemy_cms-5.1.8 app/models/alchemy/essence_richtext.rb
alchemy_cms-5.0.8 app/models/alchemy/essence_richtext.rb
alchemy_cms-5.0.7 app/models/alchemy/essence_richtext.rb