From: Dmitry S. <mi...@gm...> - 2016-02-07 20:18:21
|
Hi Waylan and all, In ReText, we (Maurice van der Pot and I) want to implement the synchronized scrolling of editor and preview areas. For that, we need to add the information about source line numbers to the HTML. Maurice has implemented an extension (attached below) that: * Has a preprocessor that inserts placeholders with text '$posmapmarker$N' to empty lines, where N is line number. * Has a block processor that parses these placeholders, gets the previous element, and sets an HTML attribute on it. This works, but is a bit hacky, and also works only on top-level elements (for example this way it's impossible to set source information on list items). Does anybody know of a better way of implementing such a thing using our extension API? -- Dmitry Shachnev |