Comments (1)
I think you're almost there. I haven't tested it, but something like
{
"ref": [
["[type=internal]", function(elt) {
let linkNum = elt.getAttribute("target").replace(/#A-/,"");
let linkPre = '{{ site.baseurl }}edition/plant';
let link = document.createElement("a");
link.innerHTML = elt.innerHTML;
link.href = linkPre.concat(linkNum);
return link;
}],
["[type=bibl][target]", ["<a href=\"$rw@target\">","</a>"]]
]
}
should work. Whether the {{ site.baseurl }}
bit works may depend on when and how your templating engine processes things. The [type=bibl][target]
is a CSS selector, and that syntax ought to work for multiple attributes.
from ceteicean.
Related Issues (20)
- How to debug HOT 1
- Strange behaviour when attribute is missing HOT 4
- Further clean-up of the CETEIcean.css HOT 2
- Endnotes no longer work! HOT 1
- Tables are broken!
- Modularize the `note` behavior
- Add option to mute URL fragment parsing HOT 3
- Problem with behaviours HOT 3
- Use CETEIcean to extract and transform only a subelement of a TEI document HOT 3
- CETEIcean does not follow <xi:include/> entries HOT 2
- Manipulating CETEIcean output elements with JS document.querySelector('tei-p[attribute='value]') HOT 1
- Declaring character entities with CETEIcean? HOT 3
- How to use CETEIcean server-side (if possible)? HOT 2
- Update spanish tutorial
- Babel seems to 'trip' over double semi-colon HOT 2
- Behavior-functions are not triggered HOT 3
- pb behaviors not triggered
- Leading space before URL attribute causes .rw() method to assume an empty URL HOT 2
- confusing line in tutorial HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ceteicean.