Any time I use setHtmlText
method the HtmlEditor
loses focus. How can I fix this?
htmlEditor.addEventHandler(KeyEvent.KEY_RELEASED, new EventHandler<KeyEvent>() {
@Override
public void handle(KeyEvent event) {
htmlEditor.setHtmlText(stripHTMLTags(htmlEditor.getHtmlText()));
htmlEditor.requestFocus();
}
});
I have tried this but still not working.