X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/efe36f4f1b5df351eeb4d40a54c3900cf9a7079b..3bd06959f2210e5d03b9377400b3b02b18a2e1ae:/src/editor/utils/wlxml.js?ds=inline diff --git a/src/editor/utils/wlxml.js b/src/editor/utils/wlxml.js index 5f1b84d..9935655 100644 --- a/src/editor/utils/wlxml.js +++ b/src/editor/utils/wlxml.js @@ -6,17 +6,17 @@ define([ -return { - wlxmlTagNames: { - '': '', +var names = { + tag: { + '': '-', section: 'sekcja', header: 'nagłówek', div: 'blok', span: 'tekst', aside: 'poboczny' }, - wlxmlClassNames: { - '': '', + 'class': { + '': '-', author: 'autor', title: 'tytuł', cite: 'cytat', @@ -33,4 +33,16 @@ return { } }; +return { + getLabel: function(of, name) { + return (names[of] && (names[of][name] || name)) || '?'; + }, + getTagLabel: function(tagName) { + return this.getLabel('tag', tagName); + }, + getClassLabel: function(className) { + return this.getLabel('class', className); + } +}; + }); \ No newline at end of file