Hi.
I've seen a lot of a plugins which add a custom link type but what I want to do is defining a variable containing a json and push elements in the link types dropdown.
Example :
var link_types = {
"link_types":
{
"Links 1":
[
{
"label": "Label 1-1",
"url": "/url-1-1"
},
{
"label": "Label 1-2",
"url": "/url-1-2"
}
],
"Links 2":
[
{
"label": "Label 2-1",
"url": "/url-2-1"
},
{
"label": "Label 2-2",
"url": "/url-2-2"
}
]
}
};
I would retrieve this in the modal :
- URL
- Anchor
- Links 1
- Links 2
Anyone have an idea ?