Closed sidvishnoi closed 7 years ago
How can I control the rendering of the content inside the custom block?
You can't, except define nested css selectors. This package is to create wrapper "div"-s and leave inner intack.
Came across this as I was beginning to write the same functionality for tabs. Is it not possible in the render function to modify the tokens
array to conform to any structure I might need to achieve the proper results?
I am tracking the index of my container_tabs_open
token type, and when I receive my container_tabs_close
callback, I now have the span of tokens that I would like to manipulate completely. Can I not delete all the tokens in that range and insert new tokens as I wish?
It would be a very bad design idea to modify foreign tokens from renderer. Because this will break border of abstraction layer. Add plugin to the end of core
chain instead. Also check twice, if you use this plugin according to it's intent. Probably, you may wish customized fenced block, if you need to modify content.
I can't say exactly, because have no details about your needs. But request to modify container content looks strange in scope of this package.
I'm trying to make a markdown-it tabs plugin.
How can I control the rendering of the content inside the custom block?
I want the output as: