Answer the question
In order to leave comments, you need to log in
Why not use BBCode?
Task. Store the content of articles in the database in processed form.
Processed view - any format that can be converted to html and vice versa, which supports any inserts, including videos from YouTube, Vimeo, VK, a player from SoundCloud, etc.
Why not store raw html? Today I need to withdraw <b>Text</b>
tomorrow the <strong>Text</strong>
day after tomorrow we <span class=”bold”>Text</span>
figured it out.
In my opinion, it is good to use BBCode for such tasks. The inserts of any external players look very concise and readable [youtube]youtube id[/youtube]
[vimeo]vimeo id[/vimeo]
, and it's also easy to write your own handler that will look appropriate. For example [mycomponent id=254]content[/mycomponent]
No! I hear a lot of opinions that using BBCode in 2017 is ... kind of an outdated solution, and they offer markdown instead.
Having surfed the Internet, I still have not found an adequate solution for embedding YouTube videos or my custom blocks in markdown.
So why not use BBCode in 2017? Or is markdown our everything and there are a couple of hooks that will cover my requirements?
Answer the question
In order to leave comments, you need to log in
For me, it doesn't matter how you store the data ... Filter the incoming and before giving back to the user, and everything will be fine.
Yes, at least ::B:: text ::B::, if you can process this data later, why pervert ...
Markdown, by the way, is by no means young ... 2004 ...
Don't worry, it's like " Are you still using JQuery? 2016/17 is React! " (what is it like learning JavaScript in 2016 anyway ).
In fact, it is not so important what to use, see what is more convenient for you to support.
Roughly the same with CodeIgniter. Version 2.X is quite efficient and run-in, but "we must go ahead" and version 3 appears. Damp and with glitches, "but this is the latest version!".
Old doesn't mean bad. Show-offs usually climb out a boooool sideways. Well, Occam's razor will help you))
There are 2 popular options: markdown (replacement for BB, more human readable) and plain html (for visual editors).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question