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

[QUESTION] Link opening #88

Closed
JEuler opened this issue Jul 12, 2021 · 8 comments
Closed

[QUESTION] Link opening #88

JEuler opened this issue Jul 12, 2021 · 8 comments
Labels
question Further information is requested

Comments

@JEuler
Copy link
Contributor

JEuler commented Jul 12, 2021

Is there any possibility to manually specify how to open the links? It is an opening the link on the same page where the editor is opened for now.

@JEuler JEuler added the question Further information is requested label Jul 12, 2021
@tneotia
Copy link
Owner

tneotia commented Jul 12, 2021

As of right now the library does not have this feature but it is not difficult to implement. I will try to add this today or tomorrow, and once it's done I will post an example for you :)

@JEuler
Copy link
Contributor Author

JEuler commented Jul 12, 2021

Thank you very much! 🍻

@tneotia
Copy link
Owner

tneotia commented Jul 13, 2021

@JEuler added this to the library. You can use a git dependency on 2.2.0+1-dev.1 and implement like this:

callbacks: Callbacks(
   onNavigationRequestMobile: (String url) {
      print(url);
      return NavigationActionPolicy.ALLOW;
   },
)

NavigationActionPolicy.CANCEL if you want to stop the URL from loading in the webview. Hope it helps :)

@JEuler
Copy link
Contributor Author

JEuler commented Jul 13, 2021

It is working, thank you very much! :)

@tneotia
Copy link
Owner

tneotia commented Jul 13, 2021

Thanks for the confirmation. If you have any other questions let me know!

@tranglt-64
Copy link

I can't implement onNavigationRequestMobile. I'm using dependency on 2.2.0+1-dev.1 but no callback function is onNavigationRequestMobile. @tneotia Can you help me?

@JEuler
Copy link
Contributor Author

JEuler commented Sep 6, 2021

@tranglt-64 try to use the GIT reference

  html_editor_enhanced:
    git:
      url: https://github.com/tneotia/html-editor-enhanced.git
      ref: 2.2.0+1-dev.1

@SomaPrasanna4037
Copy link

if i enter any link and click spacebar or any normal text then the link is not show as link it display as a text

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

No branches or pull requests

4 participants