module RailsConnector # @api public module CmsTagHelper FIELD_TYPES_WITH_ORIGINAL_CONTENT = %w[ enum html multienum reference referencelist string text ] VOID_TAGS = %w[area base br col command embed hr img input keygen link meta param source track wbr] # Returns an HTML block tag containing content from an Obj. # Add HTML attributes by passing an attributes hash to options. # The helper method is somewhat similar to (and internally uses) http://api.rubyonrails.org/classes/ActionView/Helpers/TagHelper.html#method-i-content_tag. # # This helper method also renders additional data attributes, which are needed for inplace editing. # These attributes are only rendered when appropriate, i.e. not for a regular visitor. # # @param tag_name [String, Symbol] Name of the html tag (e.g. +:h1+ or +:div+). # @param obj [Obj] A {Obj} from which attribute is read. # @param field_name [String, Symbol] Which field of the Obj should be rendered. # @param options [Hash] Additional options, which are passed to +content_tag+. Use them to add HTML attributes to the tag. # @param block [Proc] Optional block to render inner HTML. If none given the value of attribute will be rendered instead. # @return [String] The rendered html tag # # @example Renders an