Xidipity

Knowledge Base

embed script
Template: Embed Script
Xidipity WordPress Theme Knowledge Base Template Content Header Image

The purpose of this template is to add a java and/or css script in a manner which is friendly to the editor. When applied, the template displays an annotation concealing the script in the editor and hides the annotation exposing the script to the web. It should be noted the scope of any script added using this template is limited to the page. If the desire is to add css attributes with a broad scope this can be accomplished under “Customize ​ ​ Additional css “.

 

Appearance

 
Editor view
 
Script
GitHub/GIST

 

Web view
 
Script
GitHub/GIST

 

Template

<!--  wpX:SCRIPT -->
<div class="bdr:bas-2 bdr:lt-so-3x bkg:tint-bas-1 cnr:arch-sm fx:r fxa:1 fxc:3 web[dsp:none]">
  <div class="pad:hrz+0.5">
    <span class="fnt:siz-lg-5x sm)fnt:siz-lg-6x"><i class="icon:javascript"></i></span>
  </div>
  <div class="pad:hrz+0.5">
    <h5>Script</h5>
    <div>
      <span class="pad:rt+0.125"><i class="icon:paperclip"></i></span>
      <span class="fnt:wgt-500">#title#</span>
    </div>
  </div>
</div>
<div class="mce[dsp:none]">#script#</div>
<!-- /wpX:SCRIPT -->
 

​Template may scroll horizontally in some circumstances.

Markers

#title#

The goal of the title marker is to provide a reference as to the purpose of the template and is displayed in the editor as a component of the annotation.

#script#Properly written and tested script.

 

Installation

Steps
  1. highlight & copy template to clipboard
  2. click the line in your content where the list will be placed
  3. open the Xidipity Template Editor in a separate tab
  4. paste clipboard into the editor
  5. update the #title# marker as desired
  6. update the #script# marker as desired
  7. highlight & copy updated template to clipboard
  8. go back to your content
  9. click the toolbar insert template (  ) icon
  10. paste clipboard into the tool
  11. click OK to insert
​Notes

Caution should be exercised in the use of this template. Common scenarios include adding a snippet of css as a one off or javascript which enhances the ui .

 

local_police

It is strongly recommended scripts do not add to or change underlying data as this becomes a security risk.


  • Since: v1.0.0

 

September 25, 2022