C cstangor Member Licensed User Longtime User Mar 27, 2014 #1 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.
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.
Xandoca Active Member Licensed User Longtime User Mar 27, 2014 #2 cstangor said: 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. Click to expand... I've never did but take a look in HTML Editor (http://docs.oracle.com/javafx/2/ui_controls/editor.htm). Upvote 0
cstangor said: 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. Click to expand... I've never did but take a look in HTML Editor (http://docs.oracle.com/javafx/2/ui_controls/editor.htm).
C cstangor Member Licensed User Longtime User Mar 27, 2014 #4 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
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.
Xandoca Active Member Licensed User Longtime User Mar 27, 2014 #5 This code is java, you don't need to add. Just add the view to your Layout. Upvote 0
C cstangor Member Licensed User Longtime User Mar 27, 2014 #6 Sweet! Thanks again Alexandre. Upvote 0
C cstangor Member Licensed User Longtime User Mar 27, 2014 #7 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
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?
Erel B4X founder Staff member Licensed User Longtime User Mar 27, 2014 #8 A Label cannot show formatted text. Upvote 0
Xandoca Active Member Licensed User Longtime User Mar 27, 2014 #9 cstangor said: 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? Click to expand... Use WebView instead of Label. WebView1.LoadHtml(HTMLEditor.HtmlText) Upvote 0
cstangor said: 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? Click to expand... Use WebView instead of Label. WebView1.LoadHtml(HTMLEditor.HtmlText)