【发布时间】:2017-08-09 15:16:11
【问题描述】:
我想在 TextArea 中显示图像,就像在 HTML 中使用 div 和 contentEditable。
我不想要背景图片。
例如:
【问题讨论】:
-
@aristotll 也许这是解决我的问题的唯一方法。但我希望图像像文本一样可编辑。
我想在 TextArea 中显示图像,就像在 HTML 中使用 div 和 contentEditable。
我不想要背景图片。
例如:
【问题讨论】:
我看到的唯一可能是将其添加为 TextArea 的背景。例如通过 fx-background-image:url 的 css
【讨论】:
尝试将文本区域和图像添加到同一组中,例如:
Textarea text = new Textarea();
ImageView img= new ImageView ();
Group group = new Group();
group.getChildren().add(img);
group.getChildren().add(text);
【讨论】: