|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en"> |
| 3 | + |
| 4 | +<head> |
| 5 | + <meta charset="utf-8"> |
| 6 | + <title>embed js</title> |
| 7 | + <meta name="description" content=""> |
| 8 | + <meta name="viewport" content="width=device-width, initial-scale=1"> |
| 9 | + <link rel="shortcut icon" href="/favicon.ico"> |
| 10 | + <link rel="apple-touch-icon" href="/apple-touch-icon.png"> |
| 11 | + <link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,300' rel='stylesheet' type='text/css'> |
| 12 | + <!-- Place favicon.ico and apple-touch-icon.png in the root directory --> |
| 13 | + <!-- build:css(.) styles/vendor.css --> |
| 14 | + <!-- bower:css --> |
| 15 | + <link rel="stylesheet" href="/bower_components/skeleton/css/skeleton.css" /> |
| 16 | + <!-- endbower --> |
| 17 | + <!-- endbuild --> |
| 18 | + <!-- build:css(.tmp) styles/examples.css --> |
| 19 | + <link rel="stylesheet" href="styles/doc.css"> |
| 20 | + <!-- endbuild --> |
| 21 | + <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.9.1/styles/github.min.css"> |
| 22 | +</head> |
| 23 | + |
| 24 | +<body> |
| 25 | + <header> |
| 26 | + <a href="/"><img src="images/logo.png" alt=""></a> |
| 27 | + <nav> |
| 28 | + <ul> |
| 29 | + <a href="/"> |
| 30 | + <li>Home</li> |
| 31 | + </a> |
| 32 | + <a href="getting_started"> |
| 33 | + <li>Getting Started</li> |
| 34 | + </a> |
| 35 | + <a href="doc.html"> |
| 36 | + <li>Documentation</li> |
| 37 | + </a> |
| 38 | + <a href="examples.html"> |
| 39 | + <li>Examples</li> |
| 40 | + </a> |
| 41 | + </ul> |
| 42 | + </nav> |
| 43 | + </header> |
| 44 | + <div class="left-nav"> |
| 45 | + <ul> |
| 46 | + |
| 47 | + </ul> |
| 48 | + </div> |
| 49 | + <div class="container"> |
| 50 | + <h5>Advanced options</h5> |
| 51 | + <pre><code> |
| 52 | + { |
| 53 | + marked : false, |
| 54 | + markedOptions : {}, |
| 55 | + link : true, |
| 56 | + linkOptions : { |
| 57 | + target : 'self', |
| 58 | + exclude : ['pdf'], |
| 59 | + rel : '' |
| 60 | + }, |
| 61 | + emoji : true, |
| 62 | + customEmoji : [], |
| 63 | + fontIcons : true, |
| 64 | + customFontIcons : [], |
| 65 | + highlightCode : true, |
| 66 | + videoJS : false, |
| 67 | + videojsOptions : { |
| 68 | + fluid : true, |
| 69 | + preload : 'metadata' |
| 70 | + }, |
| 71 | + locationEmbed : true, |
| 72 | + mapOptions : { |
| 73 | + mode : 'place' |
| 74 | + }, |
| 75 | + tweetsEmbed : true, |
| 76 | + tweetOptions : { |
| 77 | + maxWidth : 550, |
| 78 | + hideMedia : false, |
| 79 | + hideThread : false, |
| 80 | + align : 'none', |
| 81 | + lang : 'en' |
| 82 | + }, |
| 83 | + imageEmbed : true, |
| 84 | + videoEmbed : true, |
| 85 | + videoHeight : null, |
| 86 | + videoWidth : null, |
| 87 | + videoDetails : true, |
| 88 | + audioEmbed : true, |
| 89 | + excludeEmbed : [], |
| 90 | + inlineEmbed : [], |
| 91 | + inlineText : true, |
| 92 | + codeEmbedHeight : 500, |
| 93 | + vineOptions : { |
| 94 | + maxWidth : null, |
| 95 | + type : 'postcard', //'postcard' or 'simple' embedding |
| 96 | + responsive : true, |
| 97 | + width : 350, |
| 98 | + height : 460 |
| 99 | + }, |
| 100 | + googleAuthKey : '', |
| 101 | + soundCloudOptions : { |
| 102 | + height : 160, |
| 103 | + themeColor : 'f50000', //Hex Code of the player theme color |
| 104 | + autoPlay : false, |
| 105 | + hideRelated : false, |
| 106 | + showComments : true, |
| 107 | + showUser : true, |
| 108 | + showReposts : false, |
| 109 | + visual : false, //Show/hide the big preview image |
| 110 | + download : false //Show/Hide download buttons |
| 111 | + }, |
| 112 | + beforeEmbedJSApply : function() {}, |
| 113 | + afterEmbedJSApply : function() {}, |
| 114 | + onVideoShow : function() {}, |
| 115 | + onTweetsLoad : function() {}, |
| 116 | + videojsCallback : function() {} |
| 117 | + }; |
| 118 | + </code></pre> |
| 119 | + <h5>marked</h5> |
| 120 | + <span><b>Type</b> : Boolean</span> <br> |
| 121 | + <span><b>Default</b> : <code>false</code></span> |
| 122 | + <p>An option when set to <code>true</code> will use <a href="https://github.com/chjj/marked" target="_blank">marked.js</a> to parse markdown and convert it to HTML. Make sure you have loaded marked.js before loading embed.js if this option is set to <code>true</code> else the plugin will throw an error.</p> |
| 123 | + |
| 124 | + <h5>markedOptions</h5> |
| 125 | + <span><b>Type</b> : Object</span><br> |
| 126 | + <span><b>Default</b> : <code>{}</code></span><br> |
| 127 | + <p>The option takes the marked.js <a href="https://github.com/chjj/marked#options-1" target="_blank">options.</a></p> |
| 128 | + |
| 129 | + <h5 id="link">link</h5> |
| 130 | + <span><b>Type</b> : Boolean</span><br> |
| 131 | + <span><b>Default</b> : <code>true</code></span> |
| 132 | + <p>Instructs the plugin whether or not to embed urls/ convert urls into HTML anchor tags.</p> |
| 133 | + |
| 134 | + <h5 id="link-options">linkOptions</h5> |
| 135 | + <span><b>Type</b> : object</span><br> |
| 136 | + <div class="obj"> |
| 137 | + <h5>target</h5> |
| 138 | + <span><b>Type</b> : String</span><br> |
| 139 | + <span><b>Default</b>: <code>'self'</code></span><br> |
| 140 | + <p>Same as the target attribute in html anchor tag . supports all html supported target values.</p> |
| 141 | + |
| 142 | + <h5>exclude</h5> |
| 143 | + <span><b>Type</b> : Array</span><br> |
| 144 | + <span><b>Default</b> : <code>[]</code></span> |
| 145 | + <p>Accept array of extensions to be excluded from converting into HTML anchor links</p> |
| 146 | + |
| 147 | + <h5>rel</h5> |
| 148 | + <span><b>Type</b> : string</span><br> |
| 149 | + <span><b>Default</b> : <code>''</code></span> |
| 150 | + <p>Same as the rel attribute.</p> |
| 151 | + </div> |
| 152 | + |
| 153 | + <h5 id="emoji">emoji</h5> |
| 154 | + <span><b>Type</b> : Boolean</span><br> |
| 155 | + <span><b>Default</b> : <code>true</code></span> |
| 156 | + <p>Set to <code>false</code> if you want to disable converting emoji codes into actual emojis.</p> |
| 157 | + |
| 158 | + <h5 id="customEmoji">customEmoji</h5> |
| 159 | + <span><b>Type</b> : Array</span><br> |
| 160 | + <span><b>Default</b> : <code>[]</code></span> |
| 161 | + <p>Include the names of custom emojis. Eg : <code>['emoji1', 'emoji2']</code>. Now they can be used using <code>:emoji1:</code> <code>:emoji2:</code></p> |
| 162 | + |
| 163 | + <h5 id="fontIcons">fontIcons</h5> |
| 164 | + <span><b>Type</b> : Boolean</span><br> |
| 165 | + <span><b>Default</b> : <code>true</code></span><br> |
| 166 | + <p></p> |
| 167 | + |
| 168 | + <h5 id="customFontIcons">customFontIcons</h5> |
| 169 | + <span><b>Type</b> : Array</span><br> |
| 170 | + <span><b>Default</b> : <code>[]</code></span><br> |
| 171 | + <p>You can use your customised font icon with this plugin. You need to replace the default font files with yours and provide the code to icon mapping in the format : |
| 172 | + <pre><code>customFontIcons:[{ |
| 173 | + 'text': ' :) ', |
| 174 | + 'code': '&#xe60a' |
| 175 | +}, { |
| 176 | + 'text': ' :D ', |
| 177 | + 'code': '&#xe608' |
| 178 | +}, { |
| 179 | + 'text': ' :d ', |
| 180 | + 'code': '&#xe608' |
| 181 | +}]</code></pre> |
| 182 | + </p> |
| 183 | + |
| 184 | + <h5 id="highlightCode">highlightCode</h5> |
| 185 | + <span><b>Type</b> : Boolean</span><br> |
| 186 | + <span><b>Default</b> : <code>true</code></span> |
| 187 | + <p>Set to true if you want to convert code blocks into formatted code. It uses <a href="https://highlightjs.org/">highlight.js</a> for code highlighting. Make sure highlight.js is loaded before embed.js if this option is set to <code>true</code> or else set this to <code>false</code> The format that it supports are single backticks and code blocks: |
| 188 | + <pre><code>```[optional-language-name] |
| 189 | +//code here |
| 190 | +```</code></pre> |
| 191 | +</p>. |
| 192 | + |
| 193 | + <h5 id="videojs">videoJS</h5> |
| 194 | + <span><b>Type</b> : Boolean</span><br> |
| 195 | + <span><b>Default</b> : <code>false</code></span> |
| 196 | + <p>Set to <code>true</code> if you want to enable <a href="http://videojs.com/" target="_blank">video.js</a> support for audio and video files. Make sure video.js is loaded before the plugin else the plugin will throw an error.</p> |
| 197 | + |
| 198 | + <h5 id="videojsOptions">videojsOptions</h5> |
| 199 | + <span><b>Type</b> : Object</span><br> |
| 200 | + <span><b>Default</b> : <code>{}</code></span> |
| 201 | + <p>This object is the video.js <a href="https://github.com/videojs/video.js/blob/master/docs/guides/options.md">options</a>. You can pass any option supported by video.js. Currently it will be applied to both audio and video files. Eg : |
| 202 | +<pre><code>videojsOptions : { |
| 203 | + fluid : true, |
| 204 | + preload : 'metadata' |
| 205 | +}</code></pre> |
| 206 | + </p> |
| 207 | + |
| 208 | + <h5 id="locationEmbed">locationEmbed</h5> |
| 209 | + <span><b>Type</b> : Boolean</span><br> |
| 210 | + <span><b>Default</b> : <code>true</code></span> |
| 211 | + <p></p> |
| 212 | + |
| 213 | + </div> |
| 214 | +</body> |
| 215 | +<script src="/bower_components/jquery/dist/jquery.js"></script> |
| 216 | +<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.9.1/highlight.min.js"></script> |
| 217 | +<script src="scripts/docs.js"></script> |
| 218 | + |
| 219 | + |
| 220 | +</html> |
0 commit comments