Sha256: f25c3e8e3c158e15c795e3d8ce7d2adea36fc4252d60f3fb88fd9631f01f1dd4

Contents?: true

Size: 498 Bytes

Versions: 3

Compression:

Stored size: 498 Bytes

Contents

module PandaCms
  module EditorJs
    module Blocks
      class Base
        attr_reader :data, :options

        def initialize(data, options = {})
          @data = data
          @options = options
        end

        def render
          ""
        end

        private

        def sanitize(text)
          Rails::Html::SafeListSanitizer.new.sanitize(text, tags: %w[b i u a code])
        end

        def html_safe(text)
          text.to_s.html_safe
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
panda_cms-0.6.3 app/lib/panda_cms/editor_js/blocks/base.rb
panda_cms-0.6.2 app/lib/panda_cms/editor_js/blocks/base.rb
panda_cms-0.6.1 app/lib/panda_cms/editor_js/blocks/base.rb