Ckeditor 4.2.1 _ demonstrate ckeditor upload & amp; insert Image

Source: Internet
Author: User

Content

  • FineUI ckeditor
  • Fckeditor/ckeditor
  • Demonstrate ckeditor 4.2.1 uploading and inserting Images

I recently read the FineUI_v3.3.1 control, and I am very interested in the ckeditor (html editing) control, because I used Ext. net htmleditor control, you need a function to upload and insert images, but htmleditor itself does not, write ext js Code in its toolbar to add an additional button to complete the function. However, in any case, htmleditor itself is too simple and meaningless. However, ckeditor of FineUI has a bug. So I studied the original fckeditor/ckeditor controls. This is a rigorous and cross-browser implementation method.

FineUI ckeditor

Shows the directory structure of the FineUI solution, including the documentation, FineUI source code, examples, and tools.

,{

     
      
       
      

Reference: cksource document

Samples \ myImage.html
         
          
           
            
             
              
               
                
                 
                  
                   
                    
                     
                      
                       
                        
                         
                          
                           
                            
                             
                              
                               
                                
                                 
                                  
                                   
                                    
                                     
                                      
                                       
                                        
                                         
                                          
                                           
                                            
                                             
                                              
                                           
                                           
                                           

Note:

  • "Language: 'zh-cn'" indicates that the ckeditor language is simplified Chinese.
  • Toolbar is an array. It can be written at will. Let's take a look at the changes. This example uses a two-dimensional array with three one-dimensional arrays. In this way, the ckeditor toolbar is divided into three groups, such as Class = %>
                                               
                                                
                                                 
                                                  
                                                   
                                                    
                                                     
                                                      
                                                       
                                                        
                                                         
                                                          
                                                           
                                                            
                                                             
                                                              
                                                               
                                                                
                                                                 
                                                                  
                                                                   
                                                                    
                                                                     
                                                                      
    
                                                                        
                                                                         
                                                                          
                                                                           
                                                                            
                                                                             
                                                                              
                                                                               
                                                                                
                                                                                 
    
                                                                                   
                                                                                    
                                                                                     
                                                                                      
                                                                                       
                                                                                        
                                                                                         
                                                                                          
                                                                                           
                                                                                            
                                                                                             
                                                                                              
                                                                                               
                                                                                                
                                                                                                 
                                                                                                  
                                                                                                   
                                                                                                    
                                                                                                     
                                                                                                      
                                                                                                       
                                                                                                        
                                                                                                         
                                                                                                          
                                                                                                           
                                                                                                            
                                                                                                             
                                                                                                              
                                                                                                               
                                                                                                                
                                                                                                                 
                                                                                                                  
                                                                                                               
                                                                                                               
                                                                                                               

Note:

  • Ckeditor will pass three variables to the specified handler. In this demonstration, that is, myImageUpload. ashx? CKEditor = editor1 & CKEditorFuncNum = 1 & langCode = zh. CKEditorFuncNum indicates the client script to be called.

Running result:

Figure 6

Download Demo

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.