I want to improve the capabilities of the wysiwyg editor. Namely, a modal window with the addition of a link. Below is a section of code.
self.createView('dialogInsertLink', 'views/wysiwyg/modals/insert-link', {
labels: {
insert: lang.link.insert,
openInNewWindow: lang.link.openInNewWindow,
url: lang.link.url,
textToDisplay: lang.link.textToDisplay,
itemslist:
[
{"name": "red", "first": true, "url": "#Red"},
{"name": "green", "link": true, "url": "#Green"},
{"name": "blue", "link": true, "url": "#Blue"}
]
,
Instead of an array in the "itemslist" variable, I need to make a query to the database. For example, get a list of counterparties from the "counterparties" section. How can I do this?
self.createView('dialogInsertLink', 'views/wysiwyg/modals/insert-link', {
labels: {
insert: lang.link.insert,
openInNewWindow: lang.link.openInNewWindow,
url: lang.link.url,
textToDisplay: lang.link.textToDisplay,
itemslist:
[
{"name": "red", "first": true, "url": "#Red"},
{"name": "green", "link": true, "url": "#Green"},
{"name": "blue", "link": true, "url": "#Blue"}
]
,
Instead of an array in the "itemslist" variable, I need to make a query to the database. For example, get a list of counterparties from the "counterparties" section. How can I do this?