@@ -239,7 +239,6 @@ function renderToolRec(state) {
239239// render specifically the mark formats subsections
240240function renderMarkingFormats ( state ) {
241241
242-
243242 if ( state . props . tool != 'unknown' ) { }
244243
245244 setStatePropsAttribution ( state ) ;
@@ -261,6 +260,10 @@ function renderMarkingFormats(state) {
261260 //let mark = attribution.title + ' © ' + attribution.workCreationYear + ' by ' + attribution.creator + ' is ' + type + ' ' + state.props.toolShort + '. To view a copy of this license, visit ' + state.props.toolURL;
262261 //document.querySelector('#mark-your-work .plain-text.mark').textContent = mark;
263262
263+
264+ // set contents of plain text mark
265+ // TODO: reverse use of <template> since it has limits on tokenization capacity, even if
266+ // it allows more dev readability.
264267 let template = document . getElementById ( 'plain-text' ) ;
265268 let templateContent = template . content . cloneNode ( true ) ;
266269 document . querySelector ( '#mark-your-work .plain-text.mark' ) . textContent = '' ;
@@ -286,9 +289,6 @@ function renderMarkingFormats(state) {
286289 console . log ( templateContent ) ;
287290 }
288291
289- // set contents of plain text mark
290- // TODO: reverse use of <template> since it has limits on tokenization capacity, even if
291- // it allows more dev readability.
292292 document . querySelector ( '#mark-your-work .plain-text.mark' ) . appendChild ( templateContent ) ;
293293
294294
@@ -330,12 +330,13 @@ function renderMarkingFormats(state) {
330330 currentTool = '' ;
331331 }
332332
333- let richTextMark = attribution . title + ' © ' + attribution . workCreationYear + ' by ' + attribution . creator + ' is ' + typeAsVerb + ' ' + '<a href="# ">' + state . props . toolShort + '</a>' + ccIconSet ;
333+ let richTextMark = attribution . title + ' © ' + attribution . workCreationYear + ' by ' + attribution . creator + ' is ' + typeAsVerb + ' ' + '<a href="' + state . props . toolURL + ' ">' + state . props . toolShort + '</a>' + ccIconSet ;
334334 document . querySelector ( '#mark-your-work .rich-text.mark' ) . innerHTML = richTextMark ;
335335
336336
337337 // set contents of HTML mark
338- let htmlMark = '<textarea readonly="true">' + attribution . title + '</textarea>' ;
338+ defaultHTML = '<p xmlns:cc="http://creativecommons.org/ns#">This work is licensed under <a href="https://creativecommons.org/licenses/by-sa/4.0/" target="_blank" rel="license noopener noreferrer">CC BY-SA 4.0<img src="https://mirrors.creativecommons.org/presskit/icons/cc.svg?ref=chooser-v1" alt=""><img src="https://mirrors.creativecommons.org/presskit/icons/by.svg" alt=""><img src="https://mirrors.creativecommons.org/presskit/icons/sa.svg" alt=""></a></p>' ;
339+ let htmlMark = '<textarea readonly="true">' + defaultHTML + '</textarea>' ;
339340 document . querySelector ( '#mark-your-work .html.mark' ) . innerHTML = htmlMark ;
340341}
341342
0 commit comments