GithubHelp home page GithubHelp logo

flore2003 / nativescript-markdown-view Goto Github PK

View Code? Open in Web Editor NEW
18.0 18.0 7.0 3.23 MB

A NativeScript plugin that provides a natively rendered markdown view

License: MIT License

Shell 6.57% TypeScript 27.77% Ruby 0.82% JavaScript 52.33% CSS 3.12% HTML 9.39%

nativescript-markdown-view's People

Contributors

ditoglez avatar dudipsh avatar flore2003 avatar florian-otto avatar shiv19 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

nativescript-markdown-view's Issues

Remove console log from setNative, android

v1.2.1 of this plugin has a console.log of the markdown in setNative method.
Looks like this console log no longer exists in the master branch.
Can you please publish a new version of this plugin with the console.log removed?

rendering tables

Hi! Could You please give a way to render tables from string or multiline string?

How would I render that?

this.table = `## Tables

Colons can be used to align columns.

| Tables        | Are           | Cool  |
| ------------- |:-------------:| -----:|
| col 3 is      | right-aligned | $1600 |
| col 2 is      | centered      |   $12 |
| zebra stripes | are neat      |    $1 |

There must be at least 3 dashes separating each header cell.
The outer pipes (|) are optional, and you don't need to make the
raw Markdown line up prettily. You can also use inline Markdown.

Markdown | Less | Pretty
--- | --- | ---
*Still* | \`renders\` | **nicely**
1 | 2 | 3

---`

Or this one liner string this.table="## Tables\n\nColons can be used to align columns.\n\n| Tables | Are | Cool |\n| ------------- |:-------------:| -----:|\n| col 3 is | right-aligned | $1600 |\n| col 2 is | centered | $12 |\n| zebra stripes | are neat | $1 |\n\nThere must be at least 3 dashes separating each header cell.\nThe outer pipes (|) are optional, and you don't need to make the\nraw Markdown line up prettily. You can also use inline Markdown.\n\nMarkdown | Less | Pretty\n--- | --- | ---\n*Still* | \\renders\ | **nicely**\n1 | 2 | 3\n"

NS 7 support

Hey there 👋

Does this library already support NS 7? When looking at the source code I notice some @nativescript/core imports but the package.json version seems to be 6.x.x.

If it isn't yet supported, are there any plans to update the library?

Thank you.

Not working on iOS

I have implemented as per the demo and all is working fine on Android but there is no formatting applied in iOS.

Which platform(s) does your issue occur on?

  • iOS
  • emulator (all) and device (iPhone X)

Please, provide the following version numbers that your issue occurs with:

  • CLI: 6.3.3
  • Cross-platform modules: 6.3.2
  • iOS Runtime: 6.3.0
  • Plugin(s):
    "dependencies": {
    "@nativescript/theme": "~2.2.1",
    "nativescript-markdown-view": "1.4.1",
    "tns-core-modules": "~6.3.0"
    },
    "devDependencies": {
    "nativescript-dev-webpack": "~1.4.0",
    "node-sass": "^4.7.1",
    "tslint": "~5.19.0",
    "typescript": "~3.5.3"
    }

Please, tell us how to recreate the issue in as much detail as possible.

Just follow the demo instructions

How to use with SvelteNative?

Hi @flore2003 & @ditoglez. This package is so great. I just wish that it will become available as sveltenative-markdown-view in the future. I'm currenly using SvelteNative and I have a simple svelte-native-template created by following the steps here and the app is already large so there's no issues for svelte-native.

Now, I wanted to include this package into my project. But, is it possible to use NativeScript in SvelteNative? I'm thinking that it is possible since SvelteNative is powered by NativeScript, and Svelte is just a compiler. However, I just don't know how to mix the two to add this package.

I installed it into the project just as instructed here. But I'm currently getting the error below:

Module not found: Error: Can't resolve '@nativescript/core/color/color' in '/Users/zeddrix/Documents/manatal-coop_svelte-native/node_modules/nativescript-markdown-view'
 @ ../node_modules/nativescript-markdown-view/markdown-view.js 5:14-55
 @ ./testPage.xml
 @ . sync (?<!\bApp_Resources\b.*)(?<!\.\/\btests\b\/.*?)\.(xml|css|js|(?<!\.d\.)ts|(?<!\b_[\w-]*\.)scss)$
 @ ./app.ts

Please help me connect/configure this package into my SvelteNative app after fixing this error, too. Thanks in advance.

Click on url from markdown rendered text will popup a browser but I need to override this behavior...any hint ?

I suppose it's all about override the LinkResolver behavior from java side...but honesty I don't know how to do that from typescript markdown-view.android.ts ... It seems the link resolver is inside the core and not as a plugin somewhere...

https://noties.io/Markwon/docs/v4/core/configuration.html#linkresolver

Someone has already find a solution to catch that click event instead of popup a new browser activity ?

Thanks anyway... But I know that no one will answer ... but we never know...

PodFile SWIFT_SWIFT3_OBJC_INFERENCE to On

Hi,

I've recently installed your great markdown lib into my Nativescript angular app. Thanks for that !
But it seems your PodFile is changing the build configuration of Xcode.

post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_SWIFT3_OBJC_INFERENCE'] = 'On'
end
end
end

pod 'TSMarkdownParser'

This was failing the iOS build process for other libs !

Example of error it created with nativescript-toasty :

error: method 'makeToastActivity' with Objective-C selector 'makeToastActivity:' conflicts with previous declaration with the same Objective-C selector @objc func makeToastActivity(_ point: CGPoint) { ^ .../platforms/ios/Pods/Toast-Swift/Toast/Toast.swift:279:9: note: 'makeToastActivity' previously declared here func makeToastActivity(_ position: ToastPosition) { ^ note: Using new build systemnote: Planning buildnote: Constructing build descriptionwarning: **The use of Swift 3 @objc inference in Swift 4 mode is deprecated**. Please address deprecated @objc inference warnings, test your code with “Use of deprecated Swift 3 @objc inference” logging enabled, and then disable inference by changing the **"Swift 3 @objc Inference" build setting to "Default"** for the "Toast-Swift" target. (in target 'Toast-Swift' from project 'Pods')warning: The use of Swift 3 @objc inference in Swift 4 mode is deprecated. Please address deprecated @objc inference warnings, test your code with “Use of deprecated Swift 3 @objc inference” logging enabled, and then disable inference by changing the "Swift 3 @objc Inference" build setting to "Default" for the "Toast-Swift" target. (in target 'Toast-Swift' from project 'Pods') ** BUILD FAILED **

---> So I needed to change this line to :

config.build_settings['SWIFT_SWIFT3_OBJC_INFERENCE'] = 'Default'

to get the build pass and working again.

Can you confirm that changing this will not make your lib not working as expected ?

If so, can you update your repo ?

Thanks for help and thank you for this plugin !
Lo.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.