Skip to content

Commit

Permalink
Merge pull request #75 from aem-design/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
wildone authored Jun 18, 2021
2 parents 947e12d + bd6e57d commit 8627293
Show file tree
Hide file tree
Showing 64 changed files with 785 additions and 2,810 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<workspaceFilter version="1.0">
<filter root=""/>
</workspaceFilter>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:description="used to load dialog helpers into content fragment editor."
jcr:primaryType="cq:ClientLibraryFolder"
allowProxy="{Boolean}true"
categories="[dam.cfm.authoring.v2]"
cssProcessor="[default:none,min:none]"
jsProcessor="[default:none,min:none]"/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#base=css
cf-editor.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*cf-editor.css - additional styles for content fragment editor*/

/* start counter for every text area */
.paragraphcounter {
counter-reset: cf-rte-par-counter;
}

/* increment counter every par block and add counter */
.paragraphcounter > p:before {

counter-increment: cf-rte-par-counter;
content: "#" counter(cf-rte-par-counter) "";
float: right;
color: black;
background-color: lightgray;
width: 40px;
text-align: center;
border-radius: 100%;
vertical-align: middle;
opacity: .5;

}

/* highlight every par block */
.paragraphcounter > p {

border: 1px dashed rgba(0, 0, 0, .5);

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#base=js
cf-editor.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//cf-editor.js - additional logic for content fragment editor

(function ($) {
'use strict';

$("[data-element$='__asset']").each(function(){
var name = $(this).attr("data-element").split("__asset")[0];
if (name) {
console.log("loading paragraph counter to field [" + name + "].");
var selector = ".cfm-multieditor:has(input[data-element='" + name + "']) .cfm-multieditor-richtext-editor"
$(selector).addClass("paragraphcounter");
}
})

}(jQuery));
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 8627293

Please sign in to comment.