Class: FroalaEditorSDK::Image
- Defined in:
- lib/froala-editor-sdk/image.rb
Overview
Image functionality.
Class Method Summary collapse
- 
  
    
      .load_images(path, options = {})  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    - Loads the images from a specific path Params: path
- 
The server path where the images are saved Returns Json object. 
 
- Loads the images from a specific path Params: 
Methods inherited from File
delete, resize, save, upload, #var
Class Method Details
.load_images(path, options = {}) ⇒ Object
Loads the images from a specific path Params:
- path
- 
The server path where the images are saved 
Returns Json object
| 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | # File 'lib/froala-editor-sdk/image.rb', line 23 def self.load_images(path, = {}) # Merge options. = @default_options.merge() images = Dir["#{path}*"] all_images = [] images.each do |img| all_images.push({url: "#{[:file_access_path]}#{Utils.get_file_name(img)}"}) end return all_images.to_json end |