Comments (10)
The underlying library does not plan to support this feature, as Markdown is already a "plain-text" format designed to be perfectly readable without conversion to HTML.
I'd recommend either the strip_tags()
approach, or if you really want to, create your own custom renderers to modify how the intermediate AST is converted.
from laravel-markdown.
Not sure what you mean?
from laravel-markdown.
Turns
This is a _markdown_ example
Into
This is a markdown example
without any formatting applied
from laravel-markdown.
Just put the output through php's strip_tags function.
from laravel-markdown.
That's still a pretty strange thing for you to be doing though? Why go through the expensive parsing and conversion process only to remove it all?
from laravel-markdown.
Doesn't work in circumstances where you're just wanting to remove Markdown formatting but not others (BBcode, HTML, etc). :/
from laravel-markdown.
I don't really see why you'd want to do that. Sounds like you need to write your own program from scratch to really do the job properly.
from laravel-markdown.
I understand that @BenWoodford is willing to be able to display parsed markdown and cleartext as well, by using the same markdown(ed) source. This could be useful in some circumstances, but stripping resulting html sounds like enough workaround.
from laravel-markdown.
For instance in Laravel Nova there is Markdown field, but like on index page - it is better to show text as-is without markdown. It would be nice to have this feature and its just a natural / normal thing to have.
from laravel-markdown.
Agree on @colinodell, sounds like the approach to go about it in compliance with the existing functionality.
from laravel-markdown.
Related Issues (20)
- Best practice for configuring extensions HOT 2
- How do I add classes? For example to an list? HOT 5
- Cannot add classes to the extension configuration HOT 1
- How to use localized Markdown files in Laravel HOT 1
- Laravel 8 installation problem HOT 10
- Markdown output does not print well if the text continues without any space. HOT 3
- Running the composer command throws an error HOT 11
- Is the Service Provider writing to file? HOT 2
- Your requirements could not be resolved to an installable set of packages. Installation failed, reverting ./composer.json to its original content. HOT 1
- Laravel 9 Support? HOT 5
- Update README or facade method HOT 1
- TableOfContentsExtension No data exists at the given path
- adding id to headers HOT 2
- Syntax highlight? HOT 2
- Adding extension in v14 / commonmark v2 HOT 3
- Livewire support? HOT 2
- Unexpected item 'commonmark'. HOT 2
- Add Laravel 10 support HOT 9
- Laravel 11 Support HOT 4
- using custom slug_normalizer
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-markdown.