@@ -0,0 +1,1682 @@
+package pro.simpleproject.core.helper;%0A%0Aimport java.io.File;%0Aimport java.util.List;%0Aimport java.util.Set;%0A%0Aimport javafx.scene.Node;%0Aimport javafx.scene.control.ContextMenu;%0Aimport javafx.scene.control.MenuItem;%0Aimport javafx.scene.input.Clipboard;%0Aimport javafx.scene.input.KeyCode;%0Aimport javafx.scene.input.MouseButton;%0Aimport javafx.scene.web.HTMLEditor;%0Aimport javafx.scene.web.WebView;%0A%0Apublic class EditorBuilder %7B%0A%0A%09public static void build(HTMLEditor h) %7B%0A%09%09Set%3CNode%3E s = h.lookupAll(%22.tool-bar%22);%0A%09%09for (Node n : s) %7B%0A%09%09%09n.setVisible(false);%0A%09%09%09n.setManaged(false);%0A%09%09%7D%0A%09%09h.setHtmlText(ScriptHelper.FUNC);%0A%09%09WebView v = (WebView) h.lookup(%22.web-view%22);%0A%09%09v.setContextMenuEnabled(false);%0A%09%09h.setOnKeyReleased(e -%3E %7B%0A%09%09%09if (e.getCode().equals(KeyCode.V) && e.isControlDown()) %7B%0A%09%09%09%09Clipboard cb = Clipboard.getSystemClipboard();%0A%09%09%09%09List%3CFile%3E fs = cb.getFiles();%0A%09%09%09%09if (fs != null && fs.size() %3E 0) %7B%0A%09%09%09%09%09for (File f : fs) %7B%0A%09%09%09%09%09%09putWebView(f, v);%0A%09%09%09%09%09%7D%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%7D);%0A%09%09final ContextMenu contextMenu = new ContextMenu();%0A%09%09MenuItem menuItem0 = new MenuItem();%0A%09%09menuItem0.setText(%22Cut%22);%0A%09%09MenuItem menuItem1 = new MenuItem();%0A%09%09menuItem1.setText(%22Copy%22);%0A%09%09MenuItem menuItem2 = new MenuItem();%0A%09%09menuItem2.setText(%22Paste%22);%0A%09%09contextMenu.getItems().addAll(menuItem0, menuItem1, menuItem2);%0A%09%09v.setOnMouseClicked(e -%3E %7B%0A%09%09%09if (contextMenu != null) %7B%0A%09%09%09%09contextMenu.hide();%0A%09%09%09%7D%0A%09%09%09if (e.getButton() == MouseButton.SECONDARY) %7B%0A%09%09%09%09contextMenu.show(v, e.getScreenX(), e.getScreenY());%0A%09%09%09%7D%0A%09%09%7D);%0A%09%7D%0A%0A%09public static void putWebView(File f, WebView v) %7B%0A%09%09String path = f.getPath().replace(%22%5C%5C%22, %22/%22);%0A%09%09v.getEngine().executeScript(ScriptHelper.callFunc(path));%0A%09%7D%0A%0A%7D%0A

Create EditorBuilder.java