diff --git a/README.md b/README.md index 5ce0f2bd..5e7be5a8 100644 --- a/README.md +++ b/README.md @@ -150,8 +150,10 @@ Here the list of properties accepted by the optional object that could be passed callback: Function, // default the common replacer base: string, // default MaxCDN ext: string, // default ".png" + className: string, // default "emoji" size: string|number, // default "36x36" - className: string // default "emoji" + folder: string // in case it's specified + // it replaces .size info, if any } ``` @@ -182,11 +184,27 @@ The default image extension to be used, by default it's the same as `twemoji.ext If you modify the former, it will reflect as default for all parsed strings or nodes. +##### className +The default `class` per each generated image is `emoji`. It is possible to specify a different one through this property. + + ##### size The default assets size to be used, by default it's the same as `twemoji.size` which is `"36x36"`. If you modify the former, it will reflect as default for all parsed strings or nodes. + +##### folder +In case there is no need to specify a size, it is possible to chose a folder, as it is in the case of SVG emoji. +```js +twemoji.parse(genericNode, { + folder: 'svg', + ext: '.svg' +}); +``` +This will generate urls such `https://twemoji.maxcdn.com/svg/2764.svg` instead of using a specific size based one. + + ## Tips #### Inline Styles diff --git a/package.json b/package.json index 5e1998e7..0ef1e0ee 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "1.0.2", + "version": "1.1.0", "name": "twemoji", "license": ["MIT", "CC-BY-4.0"], "description": "A Unicode standard based way to implement emoji across all platforms.", diff --git a/preview-svg.html b/preview-svg.html new file mode 100644 index 00000000..b068c8a1 --- /dev/null +++ b/preview-svg.html @@ -0,0 +1,922 @@ + + + + Twitter Emoji (Twemoji) Preview + + + + + + + + \ No newline at end of file diff --git a/preview.html b/preview.html index f50bd89d..411ac50d 100644 --- a/preview.html +++ b/preview.html @@ -25,7 +25,7 @@ vertical-align: -0.1em; } - +