diff --git a/doc/api/hooks_server-side.md b/doc/api/hooks_server-side.md index 4f441f58a..dde61fe8f 100644 --- a/doc/api/hooks_server-side.md +++ b/doc/api/hooks_server-side.md @@ -357,7 +357,7 @@ Things in context: 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 `` 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 `` 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 `` 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 `` for the content where attributes are `['tag_name', 'value']`. Example: ``` diff --git a/src/node/utils/ExportHtml.js b/src/node/utils/ExportHtml.js index c5936cf9f..ccdc3a59e 100644 --- a/src/node/utils/ExportHtml.js +++ b/src/node/utils/ExportHtml.js @@ -81,10 +81,10 @@ function getHTMLFromAtext(pad, atext, authorColors) hooks.aCallAll("exportHtmlAdditionalTags", pad, function(err, newProps){ // newProps can be simply a string (which means it is stored as attribute in the form of ['tag', 'true']) // or it can be a pair of values in an Array (for the case when it is stored as ['tag', 'value']). - // The later scenario will generate HTML with tags like + // The later scenario will generate HTML with tags like newProps.forEach(function (propName, i){ if (_.isArray(propName)) { - tags.push(propName[0] + ":" + propName[1]); + tags.push('span data-' + propName[0] + '="' + propName[1] + '"'); } else { tags.push(propName); }