On 14/07/2008, Dailey, David P. <david.dailey@sru.edu> wrote: > Hi folks. Hi David, > Is there some way to just write the source code (or wysiwyg plaintext) just once inside the appropriate tag(s), instead of having to parrot onesself? > > I'm thinking of something like <sourceAndDisplay><p><b>Hello World</b></p></sourceAndDisplay> > which would allow the author to maintain only one sequence of characters (rather than markup and appearance being maintained separately and in parallel). I've done this recently using script, by using XHR to get the current page into a JS variable and extract the snippets. DOM or innerHTML methods were not consistent cross-browser, or just not simple enough. <!-- snippetStart --><p><b>Hello World</b></p><!-- snippetEnd --> This also makes it possible for a fallback to a server-side implementation, if requried. -- LeeReceived on Tuesday, 15 July 2008 09:17:01 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:40:16 GMT