我正在尝试找到一个避免CKEditor的解决方案,但是旧的FCKeditor也会删除<i>之前插入的内容到db的任何
标记.
案件:
我将html内容插入到db中,一些内容包含<i>元素.我是用CKEditor做的.一切都很完美,内容显示在网页上.但是,当我想编辑以前插入的内容时,<i>元素丢失了.
在我的具体情况下,我使用:
<i class="fa-icon-fullscreen fa-icon-xxlarge main-color"></i>
Run Code Online (Sandbox Code Playgroud)
当然如果我禁用编辑器,内容在textarea中显示得很好.
希望我能够正确解释这个...我能够连接到我的网络服务器并下载单个文件.我现在尝试做的是连接到我的服务器并从特定文件夹下载所有苍蝇.在此我想下载图像的情况.这是我用来下载单个文件的代码......
URL url = new URL("http://127.0.0.1/Folder/file.csv");
URLConnection conexion = url.openConnection();
conexion.connect();
int lenghtOfFile = conexion.getContentLength();
InputStream is = url.openStream();
File testDirectory =
new File(Environment.getExternalStorageDirectory()+"/Folder");
if(!testDirectory.exists()){
testDirectory.mkdir();
}
FileOutputStream fos = new FileOutputStream(testDirectory+"/file.csv");
byte data[] = new byte[1024];
int count = 0;
long total = 0;
int progress = 0;
while ((count=is.read(data)) != -1){
total += count;
int progress_temp = (int)total*100/lenghtOfFile;
if(progress_temp%10 == 0 && progress != progress_temp){
progress = progress_temp;
}
fos.write(data, 0, count);
}
is.close();
fos.close();
Run Code Online (Sandbox Code Playgroud)
如何添加此代码以使其从该文件夹下载所有文件?
我想逐个加载URL.我使用String数组来存储URL.我的要求是,如果webview加载第一个url,它应该在页面启动时打印msg"page started",当页面finshes它应该显示"页面完成".第一个url加载完成后,它应该加载第二个URL并继续相同的过程.
我写的编码如下:
package com.browser;
import android.app.Activity;
import android.content.Context;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.util.Log;
import android.webkit.WebView;
import android.webkit.WebViewClient;
public class browser extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
final String[] url={"http://www.yahoo.com","http://www.google.com","http://www.ibnlive.com"};
final MyWebView mwv = new MyWebView(this);
mwv.setWebViewClient(new myweb());
new Thread(new Runnable(){
public void run(){
Log.d("runThread","runthread");
for(int i=0;i<2;i++){
openbrowser(url[i]);
}
}
private void openbrowser(String url) {
mwv.getSettings().setJavaScriptEnabled(true);
mwv.loadUrl(url);
Log.d("",""+url);
setContentView(mwv);
}
}).start();
}
public class MyWebView …Run Code Online (Sandbox Code Playgroud)