Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use core WebView #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

armstrongnate
Copy link

Fixes #14 as of react native 0.42.0.

@rwoody
Copy link

rwoody commented Mar 29, 2017

Finally was able to get this library working with this code. Two notes so far:

  • The WebView navigation bar shows and doesn't go away (the "<" ">" "Done" gray bar at the bottom of the view)
  • I can't get images to show in the editor, I've been trying:
this.editor.insertImage({
  src: 'https://example.com/my-image.jpg',
  height: 100,
  width: 100
})

@peter-tudosa
Copy link

Is anyone going o merge this PR?

@artald
Copy link
Collaborator

artald commented Apr 3, 2017

Thanks for the contribution @n8armstrong and sorry for the late reply.

We're still considering what to do with this issue. Although WebView Bridge functionality is now part of the core in latest RN versions, there's still something missing which I'm not sure will ever be supported directly in RN. I'm talking about the default "input accessory view" which is shown in iOS for any input inside the native WebView (this is the bar above the keyboard that @rwoody mentioned).

The WebView bridge package takes care of this.
While we can do it ourselves, it still means that we'll need to add another native dependency. So it's unclear what's the best solution here.

Any thoughts/suggestions are welcome.

@vladikoff
Copy link

While we can do it ourselves, it still means that we'll need to add another native dependency. So it's unclear what's the best solution here.

Any thoughts/suggestions are welcome.

I would say make this compatible with RN WebView with an additional (hopefully smaller?) native library.

@sergiulucaci
Copy link

sergiulucaci commented Mar 6, 2020

@armstrongnate thanks alot! I forked this repo and using it and your PR helps me nowadays.

@rwoody I know it's been a while, but the issue is inside WebviewMessageHandler. data must be stringified when is sent to the html:

// ....
case actions.insertImage:
  return `zss_editor.insertImage('${JSON.stringify(action.data)}');`;

Anyways, the issue I'm facing is that auto-scrolling doesn't work on iOS, tried a bunch of hacks and fixes without any success, does anyone knows why?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Webview bridge is part of React Native core
6 participants