btate / BTAndroidWebViewSelection

Example user selection for android web views.
313 stars 126 forks source link

Selection Problem on using loadDataWithBaseURL to load data #28

Closed masoud-c closed 9 years ago

masoud-c commented 9 years ago

I'm trying to load a epub file BTWebView by using loadDataWithBaseURL method. my code is: Book book = (new EpubReader()).readEpub(epubInputStream); String baseUrl=Environment.getExternalStorageDirectory().toString()+"/lohqalam/epub/"; String data = new String(book.getContents().get(0).getData()); this.loadDataWithBaseURL(baseUrl, data, "text/html", "UTF-8", null);

after the file gets load selection not working! how can I fix that??

btate commented 9 years ago

Does your epub file include these javascript files?

<script src='jquery.js'></script>
<script src='rangy-core.js'></script>
<script src='rangy-serializer.js'></script>
<script src='android.selection.js'></script>
masoud-c commented 9 years ago

thanks... that was the problem... it works now