Class: EditorJs::Blocks::DelimiterBlock

Inherits:
Base
  • Object
show all
Defined in:
lib/editor_js/blocks/delimiter_block.rb

Overview

delimiter block

Constant Summary

Constants inherited from Base

Base::InvalidBlockDataError, Base::InvalidBlockTypeError

Instance Attribute Summary

Attributes inherited from Base

#output_buffer, #raw

Instance Method Summary collapse

Methods inherited from Base

#css_name, #data, #decode_html, inherited, #initialize, load, #output, registry, #sanitize!, #type, type, #valid?

Constructor Details

This class inherits a constructor from EditorJs::Blocks::Base

Instance Method Details

#plainObject



18
19
20
# File 'lib/editor_js/blocks/delimiter_block.rb', line 18

def plain
  ''
end

#render(_options = {}) ⇒ Object



14
15
16
# File 'lib/editor_js/blocks/delimiter_block.rb', line 14

def render(_options = {})
   :hr, '', class: css_name
end

#schemaObject



7
8
9
10
11
12
# File 'lib/editor_js/blocks/delimiter_block.rb', line 7

def schema
  YAML.safe_load(<<~YAML)
    type: object
    additionalProperties: false
  YAML
end