B4J Question Text Area editor

cstangor

Member
Licensed User
Longtime User
How can I show in B$J a text area editor that allows bold, italic, etc. (much like the editor I am using to create this post).

Thanks in advance.
 

cstangor

Member
Licensed User
Longtime User
Thanks Alexandre... this seems very good although I don't have much of an idea of how to integrate it into B4J.

Could anyone give me guidance on how to implement this code? (Tutorial maybe?)

Thanks again:


B4X:
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.web.HTMLEditor;
import javafx.stage.Stage;
public class HTMLEditorSample extends Application {

@Override
public void start(Stage stage) {
stage.setTitle("HTMLEditor Sample");
stage.setWidth(400);
stage.setHeight(300);
final HTMLEditor htmlEditor = new HTMLEditor();
htmlEditor.setPrefHeight(245);
Scene scene = new Scene(htmlEditor);
stage.setScene(scene);
stage.show();
}

public static void main(String[] args) {
launch(args);
}
}
Thanks.
 
Upvote 0

cstangor

Member
Licensed User
Longtime User
OK, one more question. The editor returns HTML. Do we have a function that converts HTML to formatted text that we can put in, say, a label?
 
Upvote 0
Top