mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
Fixing ed52626
. It was closing the span with </span data-TAG=VALUE>, not </span>
This commit is contained in:
parent
ed5262650a
commit
1d134f0b13
2 changed files with 8 additions and 2 deletions
|
@ -357,7 +357,7 @@ Things in context:
|
||||||
|
|
||||||
1. Pad object
|
1. Pad object
|
||||||
|
|
||||||
This hook will allow a plug-in developer to include more properties and attributes to support during HTML Export. An Array should be returned. If a value in this array is a string, the exported HTML will contain tags like `<tag_name>` for the content where attributes are `['tag_name', 'true']`; if a value in this array is a pair `['tag_name', 'value']`, the exported HTML will contain tags like `<span data-tag_name:"value">` for the content where attributes are `['tag_name', 'value']`.
|
This hook will allow a plug-in developer to include more properties and attributes to support during HTML Export. An Array should be returned. If a value in this array is a string, the exported HTML will contain tags like `<tag_name>` for the content where attributes are `['tag_name', 'true']`; if a value in this array is a pair `['tag_name', 'value']`, the exported HTML will contain tags like `<span data-tag_name="value">` for the content where attributes are `['tag_name', 'value']`.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
```
|
```
|
||||||
|
|
|
@ -183,6 +183,11 @@ function getHTMLFromAtext(pad, atext, authorColors)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isSpanWithData(i){
|
||||||
|
var property = props[i];
|
||||||
|
return _.isArray(property);
|
||||||
|
}
|
||||||
|
|
||||||
function emitOpenTag(i)
|
function emitOpenTag(i)
|
||||||
{
|
{
|
||||||
openTags.unshift(i);
|
openTags.unshift(i);
|
||||||
|
@ -204,8 +209,9 @@ function getHTMLFromAtext(pad, atext, authorColors)
|
||||||
{
|
{
|
||||||
openTags.shift();
|
openTags.shift();
|
||||||
var spanClass = getSpanClassFor(i);
|
var spanClass = getSpanClassFor(i);
|
||||||
|
var spanWithData = isSpanWithData(i);
|
||||||
|
|
||||||
if(spanClass){
|
if(spanClass || spanWithData){
|
||||||
assem.append('</span>');
|
assem.append('</span>');
|
||||||
} else {
|
} else {
|
||||||
assem.append('</');
|
assem.append('</');
|
||||||
|
|
Loading…
Reference in a new issue