I am working with a TiddlyWiki, and I want to make a custom formatter for a list. Basically I have an html tag called popuplist
and I want to surround each line inside the tags with li
tag and remove the popuplist tag. Could someone tell me how to do this? I can use jQuery, so that's not a problem.
Asked
Active
Viewed 255 times
0

Arlen Beiler
- 15,336
- 34
- 92
- 135
2 Answers
0
You could search the TiddlyWiki HTML file for popuplist and wrap the line with the li tag by hand. Then you search and replace the popuplist tag with an empty string to remove it throughout the document.

CLSheppard
- 525
- 1
- 6
- 13
-
Please don't ask question in an answer. Ask question in the comment below the question. – Jean-François Côté Mar 13 '13 at 18:06
-
I do not know how to ask questions below the original question. I have two links below the question: "share" and "edit". – CLSheppard Mar 13 '13 at 18:53
-
that's because you don't have enough reputation (the number below your user ID). But the goal here on StackOverflow is to give answer and not to interact like in a forum. You should edit your answer to remove unnescessary question or maybe change these question into suggestion. :) – Jean-François Côté Mar 13 '13 at 19:08
0
Here is an answer that might work for the wrapping: https://stackoverflow.com/a/5744244/258482
var x = $('#xxx').wrapAll('<div></div>').parent().html();
or
var x = $('#xxx').clone().wrap('<div></div>').parent().html();
If I remember right, I eventually went another route, like tiddly markup or something like that.

Community
- 1
- 1

Arlen Beiler
- 15,336
- 34
- 92
- 135