Sha256: f421cccd242990ea1a8cc69ecab77edea674a5860e30b6cd7a1f16212d2d54f2
Contents?: true
Size: 523 Bytes
Versions: 11
Compression:
Stored size: 523 Bytes
Contents
# frozen_string_literal: true module EditorJs module Blocks class CodeBlock < Base def schema YAML.safe_load(<<~YAML) type: object additionalProperties: false properties: code: type: string required: - code YAML end def render(_options = {}) content_tag :code, class: css_name do data['code'] end end def plain data['code'].strip end end end end
Version data entries
11 entries across 11 versions & 1 rubygems