fax-url = fax-scheme ":" fax-subscriber
fax-scheme = "fax"
fax-subscriber = fax-global-phone / fax-local-phone
fax-global-phone = "+" base-phone-number [isdn-subaddress]
[t33-subaddress] [post-dial]
*(area-specifier / service-provider /
future-extension)
fax-local-phone = 1*(phonedigit / dtmf-digit /
pause-character) [isdn-subaddress]
[t33-subaddress] [post-dial]
area-specifier
*(area-specifier / service-provider /
future-extension)
t33-subaddress = ";tsub=" 1*phonedigit
<a href="fax:+358.555.1234567">+358.555.1234567</a>
tel
. const compiled = _.template(`<div><%= counter %></div>
<img class="infinitimg" src="img/<%= counter %>.png">`);
compiled({ 'counter': 1 });
// => '<div>1</div><img class="infinitimg" src="img/1.png">'
function toJSON(node) {
node = node || this;
var obj = {
nodeType: node.nodeType
};
if (node.tagName) {
obj.tagName = node.tagName.toLowerCase();
} else
if (node.nodeName) {
obj.nodeName = node.nodeName;
}
if (node.nodeValue) {
obj.nodeValue = node.nodeValue;
}
var attrs = node.attributes;
if (attrs) {
var length = attrs.length;
var arr = obj.attributes = new Array(length);
for (var i = 0; i < length; i++) {
attr = attrs[i];
arr[i] = [attr.nodeName, attr.nodeValue];
}
}
var childNodes = node.childNodes;
if (childNodes) {
length = childNodes.length;
arr = obj.childNodes = new Array(length);
for (i = 0; i < length; i++) {
arr[i] = toJSON(childNodes[i]);
}
}
return obj;
}
console.log(toJSON(document.querySelector('.menu')))
<div class="contenteditable" contenteditable>
contenteditable
</div>
.contenteditable {
max-height: 100px;
overflow-y: auto;
}