mirror of
				https://github.com/ether/etherpad-lite.git
				synced 2025-10-31 00:01:16 +01:00 
			
		
		
		
	docs
This commit is contained in:
		
							parent
							
								
									6080de9d79
								
							
						
					
					
						commit
						2218cbd252
					
				| @ -247,6 +247,23 @@ Things in context: | ||||
| 
 | ||||
| This hook will allow a plug-in developer to re-write each line when exporting to HTML. | ||||
| 
 | ||||
| ## stylesForExport | ||||
| Called from: src/node/utils/ExportHtml.js | ||||
| 
 | ||||
| Things in context: | ||||
| 
 | ||||
| 1. padId - The Pad Id | ||||
| 
 | ||||
| This hook will allow a plug-in developer to append Styles to the Exported HTML. | ||||
| 
 | ||||
| Example: | ||||
| 
 | ||||
| ``` | ||||
| exports.stylesForExport = function(hook, context){ | ||||
|   return("body{margin-left:20px;body{color:orange}"); | ||||
| } | ||||
| ``` | ||||
| 
 | ||||
| ## exportFileName | ||||
| Called from src/node/handler/ExportHandler.js  | ||||
| 
 | ||||
|  | ||||
| @ -425,6 +425,9 @@ exports.getPadHTMLDocument = function (padId, revNum, noDocType, callback) | ||||
|   { | ||||
|     if(ERR(err, callback)) return; | ||||
| 
 | ||||
|     // Include some Styles into the Head for Export
 | ||||
|     var stylesForExport = hooks.callAllStr("stylesForExport") || '' | ||||
| 
 | ||||
|     var head =  | ||||
|       (noDocType ? '' : '<!doctype html>\n') +  | ||||
|       '<html lang="en">\n' + (noDocType ? '' : '<head>\n' +  | ||||
| @ -442,6 +445,7 @@ exports.getPadHTMLDocument = function (padId, revNum, noDocType, callback) | ||||
|           'ol ol ol ol ol ol{ list-style-type: lower-roman; }' + | ||||
|           'ol ol ol ol ol ol ol { list-style-type: decimal; }' + | ||||
|           'ol  ol ol ol ol ol ol ol{ list-style-type: lower-latin; }' + | ||||
|           stylesForExport +  | ||||
|           '</style>\n' + '</head>\n') +  | ||||
|       '<body>'; | ||||
| 
 | ||||
| @ -452,6 +456,7 @@ exports.getPadHTMLDocument = function (padId, revNum, noDocType, callback) | ||||
|       if(ERR(err, callback)) return; | ||||
|       callback(null, head + html + foot); | ||||
|     }); | ||||
| 
 | ||||
|   }); | ||||
| }; | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user