Class: Alchemy::Ingredients::Html
- Inherits:
-
Alchemy::Ingredient
- Object
- ActiveRecord::Base
- BaseRecord
- Alchemy::Ingredient
- Alchemy::Ingredients::Html
- Defined in:
- app/models/alchemy/ingredients/html.rb
Overview
A HTML string
Instance Method Summary collapse
-
#preview_text(max_length = 30) ⇒ Object
The first 30 escaped characters from value.
Methods inherited from Alchemy::Ingredient
#definition, #deprecated?, #essence, #has_hint?, #has_tinymce?, #has_validations?, normalize_type, #partial_name, #preview_ingredient?, related_object_alias, #settings, #settings_value, #to_partial_path, translated_label_for, #value
Methods included from Hints
Instance Method Details
#preview_text(max_length = 30) ⇒ Object
The first 30 escaped characters from value
Used by the Element#preview_text method.
14 15 16 |
# File 'app/models/alchemy/ingredients/html.rb', line 14 def preview_text(max_length = 30) ::CGI.escapeHTML(value.to_s)[0..max_length - 1] end |