Reputation: 79
I have a webview that loads HTMLEditor's text. I don't want it to be editable. can anyone help?
thanks.
Upvotes: 2
Views: 2107
Reputation: 79
HTMLEditor htmlEd=new HTMLEditor();
String st=htmlEd.getHtmlText();
WebView browser=new WebView();
WebEngine webEngine=browser.getEngine();
if(st.contains("contenteditable=\"true\"")){
st=st.replace("contenteditable=\"true\"", "contenteditable=\"false\"");
}
webEngine.loadContent(st);
I solved my problem in this way.
Upvotes: 4