Class: Katalyst::GOVUK::Formbuilder::Elements::RichTextArea
- Inherits:
-
GOVUKDesignSystemFormBuilder::Base
- Object
- GOVUKDesignSystemFormBuilder::Base
- Katalyst::GOVUK::Formbuilder::Elements::RichTextArea
- Includes:
- GOVUKDesignSystemFormBuilder::Traits::Error, GOVUKDesignSystemFormBuilder::Traits::HTMLAttributes, GOVUKDesignSystemFormBuilder::Traits::HTMLClasses, GOVUKDesignSystemFormBuilder::Traits::Hint, GOVUKDesignSystemFormBuilder::Traits::Label, GOVUKDesignSystemFormBuilder::Traits::Supplemental
- Defined in:
- lib/katalyst/govuk/formbuilder/elements/rich_text_area.rb
Instance Method Summary collapse
- #html ⇒ Object
-
#initialize(builder, object_name, attribute_name, hint:, label:, caption:, form_group:, **kwargs) ⇒ RichTextArea
constructor
A new instance of RichTextArea.
Constructor Details
#initialize(builder, object_name, attribute_name, hint:, label:, caption:, form_group:, **kwargs) ⇒ RichTextArea
Returns a new instance of RichTextArea.
19 20 21 22 23 24 25 26 27 |
# File 'lib/katalyst/govuk/formbuilder/elements/rich_text_area.rb', line 19 def initialize(builder, object_name, attribute_name, hint:, label:, caption:, form_group:, **kwargs, &) super(builder, object_name, attribute_name, &) @label = label @caption = caption @hint = hint @form_group = form_group @html_attributes = kwargs end |
Instance Method Details
#html ⇒ Object
29 30 31 32 33 |
# File 'lib/katalyst/govuk/formbuilder/elements/rich_text_area.rb', line 29 def html GOVUKDesignSystemFormBuilder::Containers::FormGroup.new(*bound, **@form_group).html do safe_join([label_element, supplemental_content, hint_element, error_element, rich_text_area]) end end |