📄 syncedit.java
字号:
package editor;
public class SyncEdit
{
public static String encode2HTML(String str)
{
if(null == str || "".equals(str.trim())){
return str;
}
else{
String tempHtml = str;
tempHtml = tempHtml.replaceAll("&","&");
tempHtml = tempHtml.replaceAll("<","<");
tempHtml = tempHtml.replaceAll(">",">");
tempHtml = tempHtml.replaceAll("\r\n","\n");
tempHtml = tempHtml.replaceAll("\n","<br>");
tempHtml = tempHtml.replaceAll("\t"," ");
tempHtml = tempHtml.replaceAll(" "," ");
tempHtml = tempHtml.replaceAll("\"",""");
return tempHtml;
}
}
// public static void main(String[] args)
// {
// System.out.println(""+SynchEdit.encode2HTML("<> "));
// }
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -