You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-21 23:17:42 +02:00
Mobile: Improved loading of images. Added privacy policy url.
This commit is contained in:
@ -2,6 +2,7 @@ const React = require('react'); const Component = React.Component;
|
||||
const { Platform, WebView, View, Linking } = require('react-native');
|
||||
const { globalStyle } = require('lib/components/global-style.js');
|
||||
const { Resource } = require('lib/models/resource.js');
|
||||
const { Setting } = require('lib/models/setting.js');
|
||||
const { reg } = require('lib/registry.js');
|
||||
const MdToHtml = require('lib/MdToHtml.js');
|
||||
|
||||
@ -82,7 +83,8 @@ class NoteBodyViewer extends Component {
|
||||
<WebView
|
||||
scalesPageToFit={Platform.OS !== 'ios'}
|
||||
style={webViewStyle}
|
||||
source={{ html: html }}
|
||||
{/* baseUrl is where the images will be loaded from. So images must use a path relative to resourceDir. */}
|
||||
source={{ html: html, baseUrl: 'file://' + Setting.value('resourceDir') + '/' }}
|
||||
onLoadEnd={() => this.onLoadEnd()}
|
||||
onError={(e) => reg.logger().error('WebView error', e) }
|
||||
onMessage={(event) => {
|
||||
|
Reference in New Issue
Block a user