Class: Skyline::Editors::Wysiwyg

Inherits:
Editor
  • Object
show all
Defined in:
app/helpers/skyline/editors/wysiwyg.rb

Instance Method Summary collapse

Instance Method Details

#output_without_errorsObject



2
3
4
5
6
7
8
9
10
11
12
13
# File 'app/helpers/skyline/editors/wysiwyg.rb', line 2

def output_without_errors
  out = ("div",text_area_tag(
    input_name(self.attribute_names), 
    record.send(field.name,true), 
    :class => "wysiwyg", 
    :rows => 15,
    :cols => 90,
    :id => self.tag_id,
    :style => params_to_styles(field.style)
  ), :class => "section")
  out << self.tinymce_js
end

#tag_idObject



15
16
17
# File 'app/helpers/skyline/editors/wysiwyg.rb', line 15

def tag_id
  "wysiwyg" + self.attribute_names.join("_")
end

#tinymce_jsObject



19
20
21
22
23
24
25
# File 'app/helpers/skyline/editors/wysiwyg.rb', line 19

def tinymce_js
  javascript_tag "new Skyline.Editor('#{self.tag_id}',{
    contentCss : '/skyline/stylesheets/wysiwyg.css',
    #{"enableEditHtml : true," if current_user.allow?("tinymce_edit_html")}
    language : Application.locale    
  })"
end