Class: CKEditor5::Rails::Editor::EditableHeightNormalizer
- Inherits:
-
Object
- Object
- CKEditor5::Rails::Editor::EditableHeightNormalizer
- Defined in:
- lib/ckeditor5/rails/editor/editable_height_normalizer.rb
Instance Method Summary collapse
-
#initialize(editor_type) ⇒ EditableHeightNormalizer
constructor
A new instance of EditableHeightNormalizer.
- #normalize(value) ⇒ Object
Constructor Details
#initialize(editor_type) ⇒ EditableHeightNormalizer
Returns a new instance of EditableHeightNormalizer.
7 8 9 |
# File 'lib/ckeditor5/rails/editor/editable_height_normalizer.rb', line 7 def initialize(editor_type) @editor_type = editor_type end |
Instance Method Details
#normalize(value) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/ckeditor5/rails/editor/editable_height_normalizer.rb', line 11 def normalize(value) return nil if value.nil? validate_editor_type! convert_to_pixel_value(value) end |