I want something like this:
[(colour: "#2f2")[My colour-changing paragraph]]<text1|
(link: "change!")[(replace: ?text1)[(colour: "#e22")[My colour-changing paragraph]]]
but without having two copies of the text in the paragraph. Is there a better way to change the paragraph's styles?
(I know CSS and Javascript and am happy to use them. If <tag|s set the element's id="" attribute that'd be plenty for me to find a way to do it :-) )
Comments
I think my ideal solution would keep the same DOM elements when run, and only change their CSS class from one thing to another, so that e.g. expanded text would stay expanded. I can live without that for now though
narF, that's nice to know about! although it can't handle formatting with < or > in the linked passage, such as [[text->passagename]] or [text]<tag|. But (link: "text")[newtext] and [[text|passagename]] work.