orgapp / orgajs

parse org-mode content into AST
https://orga.js.org
MIT License
614 stars 61 forks source link

HTML Output with line data attributes #85

Open kettek opened 3 years ago

kettek commented 3 years ago

Would it be possible to have HTML output generate data attributes so that elements can have a custom data attribute that provides the line and/or column? The reason for this is in use with a markup editor that uses such information to synchronize an editor view with a rendered view. I have full support for this with Markdown, so it'd be great to also provide a plugin for Org-mode using this library.

I presume the place where this would have to be done is through modifying oast-to-hast? Or is there is there a more plugin/modular method to achieving such a result?

xiaoxinghu commented 3 years ago

Yes, you are right, it has to be done in oast-to-hast, maybe as an option. So you can turn it on and off at will. Will put this on the list.