// get the enlighter settings of the current selected node var getCodeblockSettings = function () { // get current node var node = editor.selection.getNode(); // enlighter element ? if (!isEnlighterCode(node)) { return {}; } // get linenumber attribute (null: not set | true/false) var ln = node.getAttribute('data-enlighter-linenumbers'); // generate config return { language: node.getAttribute('data-enlighter-language'), linenumbers: (ln == null ? _enlighterjs_config.config.linenumbers : (ln == 'true')), highlight: node.getAttribute('data-enlighter-highlight'), lineoffset: node.getAttribute('data-enlighter-lineoffset'), theme: node.getAttribute('data-enlighter-theme'), group: node.getAttribute('data-enlighter-group'), title: node.getAttribute('data-enlighter-title') }; };