JavaScript Editor
Set the createCommand property of the jqxEditor. Author: http://jqwidgets.com
by mark edwards
HTML
<link rel="stylesheet" href="http://jqwidgets.com/public/jqwidgets/styles/jqx.base.css">
<link rel="stylesheet" href="http://jqwidgets.com/public/jqwidgets/styles/jqx.energyblue.css">
<script src="http://jqwidgets.com/public/jqwidgets/jqx-all.js"></script>
<textarea id="editor"></textarea>
JavaScript
$('#editor').jqxEditor({
height: 400,
width: 500,
theme: 'energyblue',
tools: 'datetime | print | clear',
createCommand: function (name) {
switch (name) {
case "datetime":
return {
type: 'list',
tooltip: "Insert Date/Time",
init: function (widget) {
console.log('AAAAAAAAA');
//widget.jqxDropDownList.on('select', (event) => { debugger;});
widget.jqxDropDownList({
placeHolder: "Insert Custom HTML",
width: 170,
//source: ['Insert Time', 'Insert Date'],
source : [
"<span class='ipSymbol'>θ</span>\
<span class='ipSymbol'>ʃ</span>\
<span class='ipSymbol'>t</span>\
<span class='ipSymbol'>ʊ</span>\
<span class='ipSymbol'>ʌ</span>",
"Affogato",
"Americano",
"Café au lait"],
autoDropDownHeight: true
});
debugger;
widget.jqxDropDownList('on', 'select', (event) => { debugger;} );
},
refresh: function (widget, style) {
// do something here when the selection is changed.
widget.jqxDropDownList('clearSelection');
},
action: function (widget, editor) {
debugger;
//console.log(event.args.originalEvent.pageX);
//console.log(event.currentTarget.offsetWidth);
var widgetValue = widget.val();
var...