Module: Card::Set::All::ReferenceEditor::NestImage::HtmlFormat

Extended by:
Card::Set::AbstractFormat
Defined in:
platypus/tmp/set/gem-defaults/mod033-tinymce_editor/all/reference_editor/nest_image.rb

Instance Method Summary collapse

Instance Method Details

#adapt_reference_editor_for_imagesObject



39
40
41
42
43
44
# File 'platypus/tmp/set/gem-defaults/mod033-tinymce_editor/all/reference_editor/nest_image.rb', line 39

def adapt_reference_editor_for_images
  nest_name = card.autoname("image01")
  voo.show! :content_tab
  @nest_content_tab = nest(nest_name, view: :new_image, type: :image, hide: :guide)
  @nest_snippet = Card::Reference::NestParser.new_image nest_name
end

#nest_image_editor(editor_mode) ⇒ Object



34
35
36
37
# File 'platypus/tmp/set/gem-defaults/mod033-tinymce_editor/all/reference_editor/nest_image.rb', line 34

def nest_image_editor editor_mode
  adapt_reference_editor_for_images
  nest_editor editor_mode, :nest, "Image", "image_nest"
end


15
16
17
18
# File 'platypus/tmp/set/gem-defaults/mod033-tinymce_editor/all/reference_editor/nest_image.rb', line 15

view :modal_nest_image, unknown: true, cache: :never,
                        wrap: { slot: { class: "nodblclick" } } do
  nest_image_editor :modal
end

#view: nest_imageObject



9
10
11
12
13
# File 'platypus/tmp/set/gem-defaults/mod033-tinymce_editor/all/reference_editor/nest_image.rb', line 9

view :nest_image,
     unknown: true, cache: :never,
     wrap: { slot: { class: "_overlay d0-card-overlay card nodblclick" } } do
  nest_image_editor :overlay
end

#view: new_imageObject



20
21
22
23
24
25
26
# File 'platypus/tmp/set/gem-defaults/mod033-tinymce_editor/all/reference_editor/nest_image.rb', line 20

view :new_image, perms: :create, unknown: true, cache: :never, wrap: :slot do
  voo.buttons_view = :new_image_buttons
  create_form success: { tinymce_id: Env.params[:tinymce_id],
                         view: :new_image, type: :image,
                         slot: { hide: :guide, type: :image, show: :preview_redirect },
                         id: card.autoname(card.name.next) }
end

#view: new_image_buttonsObject



28
29
30
31
32
# File 'platypus/tmp/set/gem-defaults/mod033-tinymce_editor/all/reference_editor/nest_image.rb', line 28

view :new_image_buttons do
  button_formgroup do
    [standard_save_button(no_origin_update: true)]
  end
end