Reputation: 7094
I run a site where users submit basic news articles. I want to add some formatting features for their submissions.
Is it possible to add custom formatting to text only using CSS?
For example, user can add:
**This should be bold**
And the text appears bold. Or user adds >
at the beginning of the paragraph:
> This could be a lengthy paragraph
And the paragraph is aligned to the center.
Is such thing possible to do?
Upvotes: 1
Views: 68
Reputation: 4903
It's not possible using pure CSS.
You have to use Javascript
or JQuery
or process your custom tags in Server-Side
and render them as html and css as you want.
Upvotes: 1
Reputation: 1573
No it is not. You will need javascript or php to replace **
with <b>
for example. Otherwise your users would need to put in <b>Hello</b>
Upvotes: 0