mirror of
https://github.com/Jermolene/TiddlyWiki5.git
synced 2026-03-10 08:43:08 -07:00
* remove blks first try * dprint.json seems to be OK, some forgotten functions * add some more space-after-keyword settings * server remove blks * add **/files to dprint exclude * dprint.js fixes a typo * add boot.js and bootprefix.js to dprint exclude * dprint change dprint.json * add dprint fmt as script * remove jslint comments * fix whitespace * fix whitespace * remove function-wrapper from geospatial plugin * fix whitespace * add function wrapper to dyannotate-startup * remove dpring.json
31 lines
520 B
JavaScript
31 lines
520 B
JavaScript
/*\
|
|
title: $:/core/modules/macros/makedatauri.js
|
|
type: application/javascript
|
|
module-type: macro
|
|
|
|
Macro to convert a string of text to a data URI
|
|
|
|
<<makedatauri text:"Text to be converted" type:"text/vnd.tiddlywiki">>
|
|
|
|
\*/
|
|
|
|
"use strict";
|
|
|
|
/*
|
|
Information about this macro
|
|
*/
|
|
|
|
exports.name = "makedatauri";
|
|
|
|
exports.params = [
|
|
{name: "text"},
|
|
{name: "type"},
|
|
{name: "_canonical_uri"}
|
|
];
|
|
|
|
/*
|
|
Run the macro
|
|
*/
|
|
exports.run = function(text,type,_canonical_uri) {
|
|
return $tw.utils.makeDataUri(text,type,_canonical_uri);
|
|
};
|