How to use CKEditor in a Bootstrap Modal?

后端 未结 14 1395
名媛妹妹
名媛妹妹 2020-11-30 04:14

If I use the CKEditor plugin in an HTML page based on a Bootstrap template, it works great, however if I insert the editor on a Bootstrap Modal like this

<         


        
14条回答
  •  旧时难觅i
    2020-11-30 04:41

    This is very short and simple. import CKEditor Javascript config files from the path they are store in your app. This is mine

    
    
    

    After this you can call CKEditor to replace your textarea by doing this

    CKEDITOR.replace('topic', {
              uiColor: '#9AB8F3',
    			    language: "en-us",
    			    toolbar: "Custom",
              height: "200",
              width: "400",
    			    skin: "moono",
    			    toolbar_Custom: [
    			    	["Bold", "Italic", "Underline"], 
    			    	["NumberedList", "BulletedList", "-", "Outdent", "Indent", "-", "JustifyLeft", "JustifyCenter", "JustifyRight", "JustifyBlock"], 
    			    	["Link", "Unlink"]
    			    ],  
    });
    
    
    
    
    
    
     
    
    

提交回复
热议问题