Skip to content

Instantly share code, notes, and snippets.

View dpogni's full-sized avatar

Dean dpogni

View GitHub Profile
<style> html {display : none; } </style>
<!-- hides the document and prevents clicks -->
<script>
if (top !== self) { top.location = self.location; } // Attempt to escape frame
else { document.documentElement.style.display = 'block'; } // If not in frame, make html visible
</script>
function HtmlEncode(s) {
var HTMLCharMap = {
"&" : "&amp;",
"'" : "&#39;",
'"' : "&quot;",
"<" : "&lt;",
">" : "&gt;",
"\\" : "&#x5c;",
"`" : "&#x60;",
@dpogni
dpogni / gist:d87dece32356e019005cc508afc47425
Created September 5, 2019 00:27
AEM RTE Tool Bar Options
# found on blogt post http://keysandstrokes.info/touch-ui-rich-text-editor-add-inline-plugins/
"toolbar": [
"format#bold",
"format#italic",
"format#underline",
"subsuperscript#subscript",
"subsuperscript#superscript",
"-",
"misctools#specialchars",
@dpogni
dpogni / .content.xml
Created September 3, 2019 23:48 — forked from briankasingli/.content.xml
AEM 6.4 RichText Editor - Enable all features, and disable inline full screen option; the inline fullscreen option causes too many problems.
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="cq:Component"
jcr:title="Rich Text"
sling:resourceSuperType="core/wcm/components/text/v2/text"
componentGroup="General"/>
/**
* Throttle Handler
* @param {function} callback
* @param {number} limit (ms)
*/
export function throttle (callback, limit = 100) {
let wait = false;
return function throttleReturn(...args) {
if (!wait) {
callback.apply(null, ...args);
<alignment jcr:primaryType="nt:unstructured"
name="./alignChildren"
fieldLabel="Alignment of components"
required="{Boolean}true"
selectionMode="single"
sling:resourceType="granite/ui/components/coral/foundation/form/buttongroup">
<items jcr:primaryType="nt:unstructured">
<default jcr:primaryType="nt:unstructured"
name="./default"
Setting up IDE (Eclipse, Intellij, VSCode)
https://helpx.adobe.com/experience-manager/kt/platform-repository/using/local-aem-dev-environment-article-setup.html#setup-integrated-env
@dpogni
dpogni / _cq_dialog.xml
Last active November 17, 2023 21:29
AEM Flat Multifield
<images
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/multifield"
typeHint="String[]"
fieldLabel=""
fieldDescription="">
<field
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/pathbrowser"
fieldLabel=""
@dpogni
dpogni / _cq_dialog.xml
Last active June 13, 2019 23:24
AEM Composite Multifield
<cta
jcr:primaryType="nt:unstructured"
jcr:title="CTA"
sling:resourceType="granite/ui/components/foundation/section">
<layout
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns"
margin="{Boolean}false"/>
<items jcr:primaryType="nt:unstructured">
<column
@dpogni
dpogni / _cq_dialog.xml
Created August 15, 2018 21:22
reference another dialog
<cta
jcr:primaryType="nt:unstructured"
jcr:title="CTA"
sling:resourceType="granite/ui/components/foundation/include"
path="project/components/content/sample-component/cq:dialog/content/items/ctaMultifield" />