flore2003 / nativescript-markdown-view Goto Github PK
View Code? Open in Web Editor NEWA NativeScript plugin that provides a natively rendered markdown view
License: MIT License
A NativeScript plugin that provides a natively rendered markdown view
License: MIT License
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?
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"
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.
It should be possible to provide a font size for the rendered markdown. Currently it is not possible to change it.
I have implemented as per the demo and all is working fine on Android but there is no formatting applied in iOS.
Just follow the demo instructions
Currently tapping a link from the parsed markdown doesn't do anything.
Can be reproduced on iOS.
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.
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...
Is there an example of use with nativescript-view?
I tried to import it into a component as an element but it doesn't work.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.