Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <script src='https://rtcdn.cincopa.com/libasync.js' type='text/javascript'></script>
<div>
<div id="your_site" style="margin-right:50px;"></div>
<div style="max-width:800px;">
    <p>
        <strong>load_gallery()</strong> method will use <strong>cincopa.boot_gallery</strong> to load gallery<br/>
        <strong><pre>
        /**
        *
        * @param {object} loadObject - { 
        *                               "_object": "ID of the Element where to append or HtmlDomElement" ( required )
        *                               "_fid": "Gallery Fid" ( required )
        *                               "_editor": "Editor Object" (optional)
        *                               }
        *
        */
        cincopa.boot_gallery = function(loadObject)
        </pre></strong>
    </p>
    <br>
    <p>
        Editor Object example
        <strong><pre>
            let editor = {
                load_modules:[
                {name:"chapters"}, 
                {name:"thumbnail"},
                {name:"captions"},
            ],
            token:"TOKEN"
            };
        </pre></strong>
            <strong>chapters</strong>, <strong>thumbnail</strong> and <strong>captions</strong> ready to use modules so just including it in load_modules Array to activate them,
            Its possible also to develop custom modules and load it with editor in this case editor object will be
        <pre>
            <strong><pre>
            let editor = {
                load_modules:[
                {name:"chapters"}, 
                {name:"thumbnail"},
                {name:"captions"},
                {name:'customModuleName','js_path':"PATH TO MODULE1 JS", 'css_path': 'PATH TO MODULE1 CSS'}
                {name:'customModuleName2','js_path':"PATH TO MODULE2 JS", 'css_path': 'ATH TO MODULE2 CSS'}
            ],
            token:"TOKEN"
            };
        </pre></strong>
    </p>
    <p>
       To get TOKEN you can use  https://www.cincopa.com/media-platform/api-documentation-v2#token.get_temp, 
	   must be done server side call to token.get_temp that is limited to this asset
       Example call, more details you can find in our api documentation.
       <strong><pre>
            https://api.cincopa.com/v2/token.get_temp.json?api_token=TOKEN&permissions=token.temp_token&rid=AUIDkjlYhZHB
        </pre></strong>

    </p>
</div>

</div>

              
            
!

CSS

              
                
              
            
!

JS

              
                	function load_gallery() { 
		
		var cp_div = document.createElement('div');
		// setting style is not needed it is just for this test
		cp_div.style="width:650px;display:inline-block;";
		document.getElementById("your_site").appendChild(cp_div);
			let editor = {
			  load_modules:[
				{name:"chapters"}, 
				{name:"thumbnail"},
				{name:"captions"}
			],
			token:"1505013iobqgorpe0fagpl5lbdgyga40b3a"
		};
		cincopa.boot_gallery({
      "_object": cp_div, 
       "_fid": "A4HAcLOLOO68!AUIDkjlYhZHB", 
       "_editor":editor
    });
	}
  
	load_gallery();
              
            
!
999px

Console