Hi @arunpatidar ,
I hope you doing well.
I was following your article https://aemlab.blogspot.com/2019/07/aem-rte-custom-plugins-1.html.
AEM 6.5.13.
A)In Style Picker, close (x) and tick (✓) button does not work. When we try to click, it gives below error:
"Resource at '/apps/commons/rte/plugins/popovers/style-picker/undefined' not found: No resource found"
B) Remove style button: After we add a style using "Add property" button. Next time, if we want to remove this style from same text, It does not pre-select style in dropdown that was selected while using "Add styles button".
Screen Below:
Thanks a lot in advance.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
Did you see, any console errors in the browser ?
Those buttons were removed using javascript in this plugin(you can check gif in the blog) and close button has event to close the popup.
Seems like might be issue with underscore js.
Did you check , the below 2 paths are existing or not.
Datasource is a JSP file which read json specified in options property and populates dropdown option for Style Picker plugin.
JSON file should have an array of elements in below format:
If want to show as Heading/Category use below format(value could be anything)
{"text": "Background Color","value": "BTC","heading": "true"}
If Option
{"text": "White","value": "white"}
Example : /apps/commons/rte/plugins/popovers/style-picker/options.json
[
{"text": "Background Color","value": "BTC","heading": "true"},
{"text": "White","value": "white"},
{"text": "Black","value": "black"},
{"text": "Green","value": "green"},
{"text": "Orange","value": "orange"},
{"text": "Light Grey","value": "lightgrey"},
{"text": "List Style","value": "LS","heading": "true"},
{"text": "Check","value": "list-checked"},
{"text": "Cross","value": "list-crossed"},
{"text": "Link Style","value": "LS","heading": "true"},
{"text": "Primary","value": "btn-primary"},
{"text": "Secondary","value": "btn-secondary"}
]
Thanks ,
Siva
Thanks for your kind reply. All Paths exist in AEM.
Issue is bit different. Not Data source .
If you could see below Gif FILE, when we try to close (X), It gives error.
FYI: @arunpatidar
Hi,
Did you see, any console errors in the browser ?
Those buttons were removed using javascript in this plugin(you can check gif in the blog) and close button has event to close the popup.
Seems like might be issue with underscore js.
yes, styles are not pre selected, I will try to fix this.
we will fix it and share fully functional package shortly.
you can trying adding another action on load to get the value and set the options
sendDataMessage("load");
if (action === "load") {
console.log('inside load : ' + inline);
var $targetNode = startNode.nodeType == 3 ? $(startNode).parent() : $(startNode);
var classList =$targetNode.attr('class').split(' ');
$stylePicker = jQuery(document).find('.coral3-Select[name="./style"]');
$stylePicker.items.each({
console.log($(this))
// set values
})
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies