Skip to content

Commit

Permalink
Fixes to import RTA control with Scene Builder (#356)
Browse files Browse the repository at this point in the history
  • Loading branch information
jperedadnr committed Aug 16, 2024
1 parent 068f876 commit 942db13
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@

import static com.gluonhq.richtextarea.model.TableDecoration.TABLE_SEPARATOR;

public class ParagraphTile extends HBox {
class ParagraphTile extends HBox {

private static final double INDENT_PADDING = 20.0;

Expand Down
6 changes: 5 additions & 1 deletion rta/src/main/java/com/gluonhq/richtextarea/RichTextArea.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@
public class RichTextArea extends Control {

public static final String STYLE_CLASS = "rich-text-area";
public static final DataFormat RTA_DATA_FORMAT = new DataFormat("text/rich-text-area");
public static final DataFormat RTA_DATA_FORMAT;
static {
DataFormat dataFormat = DataFormat.lookupMimeType("text/rich-text-area");
RTA_DATA_FORMAT = dataFormat == null ? new DataFormat("text/rich-text-area") : dataFormat;
}
private static final PseudoClass PSEUDO_CLASS_READONLY = PseudoClass.getPseudoClass("readonly");

private final ActionFactory actionFactory = new ActionFactory(this);
Expand Down

0 comments on commit 942db13

Please sign in to comment.