Why does .elgg-lightbox assume JSON as a return type?

I created a popup to summarize my page content using .elgg-lightbox in Elgg 3.0.3. But when .elgg-lightbox element is triggered, it returns the popup with only plain HTML text, no CSS properties with it. 

//creating a link

elgg_view('output/url', array(

   'href' => elgg_get_site_url( ) . 'plugin_name/summary_view',

   'text' => 'Summary',

   'class' => 'elgg-lightbox',

   'data-colorbox-opts' => json_encode([

      'width' => '80%',

      'height' => '80%',

      'iframe' => true,])


Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking