首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

fckeditor 上传图片动态返回有关问题

2013-10-13 
fckeditor 上传图片动态返回问题页面调用fckeditortextarea idcontent namecontent/textareasc

fckeditor 上传图片动态返回问题
页面调用fckeditor                 
                <textarea id="content" name="content"></textarea>
                <script type="text/javascript">
                    var oFCKeditor = new FCKeditor('content') ;
                    oFCKeditor.BasePath = "../../fckeditor/";
                    oFCKeditor.Width='95%';
                    oFCKeditor.Height = 300;
                    oFCKeditor.ToolbarSet = "Sjswsbs";
                    oFCKeditor.ReplaceTextarea();                    
                </script>

fckeditor 点击fckeditor 上传图片动态返回有关问题

执行returnvalue = F.showModalDialog(winStr,"","font-family:Verdana;font-size:12;dialogWidth:610px; dialogHeight:300px;status:yes;scrollbars=yes");

            var oEditor = FCKeditorAPI.GetInstance('content');//这里怎么动态获取实例名
            
            if ( oEditor.EditMode == FCK_EDITMODE_WYSIWYG )
            {
                var url;        
                var filename;
                var returnval="";
            if (returnvalue!=null && returnvalue!=""){
                var arr = new Array();
                var filearr = new Array();
                arr = returnvalue.split("|||||");
                    url = arr[0];
                    filename = arr[1];
                    filearr = filename.split("-----");
                    //alert(filearr.length);
                    for(var j = 1; j < filearr.length; j++){
                        returnval += "<br><img src="" + url + filearr[j] +"" border="0">";
                    }
                    oEditor.InsertHtml(returnval) ;
                    //oEditor.InsertHtml("<img src="" + returnvalue + "" border="0">") ;
                }
            } fckeditor 图片
[解决办法]
fckeditor 挺丑的,用kindeditor吧,美观!

热点排行