Example:
package javafx_html;
import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.GroupBuilder;
import javafx.scene.Scene;
import javafx.scene.web.HTMLEditor;
import javafx.stage.Stage;
/**
*
* @web http://java-buddy.blogspot.com/
*/
public class JavaFX_HTMLeditor extends Application {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage primaryStage) {
primaryStage.setTitle("java-buddy.blogspot.com");
Group root = new Group();
final HTMLEditor htmlEditor = new HTMLEditor();
Group myGroup = GroupBuilder.create()
.children(htmlEditor)
.build();
root.getChildren().add(myGroup);
primaryStage.setScene(new Scene(root, 500, 400));
primaryStage.show();
}
}
Next: - Obtain content of HTMLEditor