Example usage for javafx.scene.web HTMLEditor setHtmlText

List of usage examples for javafx.scene.web HTMLEditor setHtmlText

Introduction

In this page you can find the example usage for javafx.scene.web HTMLEditor setHtmlText.

Prototype

public void setHtmlText(String htmlText) 

Source Link

Document

Sets the HTML content of the editor.

Usage

From source file:Main.java

@Override
public void start(Stage stage) {
    stage.setTitle("HTML");
    stage.setWidth(500);/* w  w  w .  j a v a2 s  . c o  m*/
    stage.setHeight(500);
    Scene scene = new Scene(new Group());

    VBox root = new VBox();

    final HTMLEditor htmlEditor = new HTMLEditor();
    htmlEditor.setPrefHeight(600);
    htmlEditor.setHtmlText(INITIAL_TEXT);

    root.getChildren().addAll(htmlEditor);
    scene.setRoot(root);

    stage.setScene(scene);
    stage.show();
}