Parse json url in javascript to get options in RTE from data source

Aem_Rockstar

08-03-2019

I am trying to get options values from "/etc/acs-commons/lists/list/_jcr_content.list.json"  in RTE dropdown.
Experiencing Adobe Experience Manager - Day CQ: AEM 63 - Touch UI Extend Rich Text Link Dialog, Add ...  I am going through this but trying to get options parsing from datasource. Please help me how to get those values in this funtions getLinkRelOptionsHtml().

Accepted Solutions (1)

Accepted Solutions (1)

Aem_Rockstar

13-03-2019

This worked for me

$.ajax({ url: "/etc/acs-commons/lists/list/_jcr_content.list.json",

        dataType: 'json',

        async: false,

        success: function(data) { $.each(data, function(i,value) { html = html + getOptionHtml(value); }); } });

Answers (4)

Answers (4)

Gaurav-Behl

MVP

08-03-2019

Not sure if this helps in what you're looking for --

$.getJSON( "/etc/acs-commons/lists/list/_jcr_content.list.json", function( data ) {

JSON.parse(data); 

// do something with parsed values or inject it into RTE DOM

});