diff --git a/src/components/plugin/SectionText.vue b/src/components/plugin/SectionText.vue index 8e592d1..1f8be26 100644 --- a/src/components/plugin/SectionText.vue +++ b/src/components/plugin/SectionText.vue @@ -16,14 +16,14 @@ {{ langs.content }}: {{ (text) ? text : ' ' }} - + {{ langs.content }} - + {{ langs.type }} - + {{ langs.typeplaintext }} {{ langs.typeheader }} 1 {{ langs.typeheader }} 2 @@ -33,8 +33,21 @@ - - + Wyrównanie + + + format_align_left + + + format_align_center + + + format_align_right + + + format_align_justify + + {{ @@ -78,9 +91,10 @@ export default { this.align = (this.value && this.value.align) ? this.value.align : this.align; if (this.value.open) this.modalBox = true; console.log('mounted text'); - this.$emit('input',this.value); + this.$emit('input', this.value); }, + methods: { removeItem: function () { this.$emit('itemRemoved', this.value); @@ -95,8 +109,8 @@ export default { }) } }, - destroy(){ - this.modalBox=false; + destroy() { + this.modalBox = false; } } diff --git a/src/components/plugin/SectionTextarea.vue b/src/components/plugin/SectionTextarea.vue index 2e1b626..2d411af 100644 --- a/src/components/plugin/SectionTextarea.vue +++ b/src/components/plugin/SectionTextarea.vue @@ -61,6 +61,18 @@ export default { vtinymce: tinymceConfig, } }, + watch: { + modalBox: function() { + if (this.modalBox) { + document.addEventListener('focusin', (e) => { + if (e.target.closest(".tox-tinymce-aux, .moxman-window, .tam-assetmanager-root") !== null) { + e.stopImmediatePropagation(); + } + }); + } + console.log('focus'); + }, + }, computed: { ctext: function () { return this.value.text?this.value.text.replace(/<(?:.|\n)*?>/gm, ''):''; diff --git a/src/components/tinymce/config.js b/src/components/tinymce/config.js index 9744501..3089142 100644 --- a/src/components/tinymce/config.js +++ b/src/components/tinymce/config.js @@ -3,6 +3,7 @@ export default { width: '100%', selector: "textarea.wysiwyg", language: "pl", + language_url:'https://www.magico.pl/assets/js/tinymce/langs/pl.js', forced_root_block: "p", entity_encoding: 'named', entities: '160,nbsp,38,amp,60,lt,62,gt', @@ -107,8 +108,8 @@ export default { }, plugins: ['advlist', 'autolink', 'lists', 'link', 'image', 'print', 'hr', 'anchor', 'media', 'pagebreak' ,'searchreplace', 'wordcount', 'visualblocks', 'visualchars', 'code' ,'insertdatetime', 'nonbreaking', 'save', 'table', 'contextmenu', 'directionality' ,'emoticons', 'paste', 'textcolor', 'textpattern', 'codesample', 'charmap', 'autoresize'], removed_menuitems: 'newdocument', - toolbarxx: "undo redo | styleselect | bold italic | bullist numlist outdent indent | alignleft aligncenter alignright alignjustify | link image forecolor backcolor mybutton mybuttona", - toolbar1: 'undo redo | insert | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | media | forecolor backcolor', + toolbarxx: "undo redo | bold italic | bullist numlist outdent indent | alignleft aligncenter alignright alignjustify | link image forecolor backcolor", + toolbar1: 'undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | media | forecolor backcolor', toolbar2: '', - menubar:false, + menubar:true, } \ No newline at end of file diff --git a/src/components/tinymce/pl.js b/src/components/tinymce/pl.js new file mode 100644 index 0000000..d0a0627 --- /dev/null +++ b/src/components/tinymce/pl.js @@ -0,0 +1,7 @@ +/*! + * TinyMCE Language Pack + * + * Copyright (c) 2022 Ephox Corporation DBA Tiny Technologies, Inc. + * Licensed under the Tiny commercial license. See https://www.tiny.cloud/legal/ + */ +tinymce.addI18n("pl",{"Redo":"Powt\xf3rz","Undo":"Cofnij","Cut":"Wytnij","Copy":"Kopiuj","Paste":"Wklej","Select all":"Zaznacz wszystko","New document":"Nowy dokument","Ok":"Ok","Cancel":"Anuluj","Visual aids":"Pomoce wizualne","Bold":"Pogrubienie","Italic":"Kursywa","Underline":"Podkre\u015blenie","Strikethrough":"Przekre\u015blenie","Superscript":"Indeks g\xf3rny","Subscript":"Indeks dolny","Clear formatting":"Wyczy\u015b\u0107 formatowanie","Remove":"Usu\u0144","Align left":"Wyr\xf3wnaj do lewej","Align center":"Wyr\xf3wnaj do \u015brodka","Align right":"Wyr\xf3wnaj do prawej","No alignment":"","Justify":"Wyjustuj","Bullet list":"Lista wypunktowana","Numbered list":"Lista numerowana","Decrease indent":"Zmniejsz wci\u0119cie","Increase indent":"Zwi\u0119ksz wci\u0119cie","Close":"Zamknij","Formats":"Formaty","Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.":"Twoja przegl\u0105darka nie obs\u0142uguje bezpo\u015bredniego dost\u0119pu do schowka. U\u017cyj zamiast tego kombinacji klawiszy Ctrl+X/C/V.","Headings":"Nag\u0142\xf3wki","Heading 1":"Nag\u0142\xf3wek 1","Heading 2":"Nag\u0142\xf3wek 2","Heading 3":"Nag\u0142\xf3wek 3","Heading 4":"Nag\u0142\xf3wek 4","Heading 5":"Nag\u0142\xf3wek 5","Heading 6":"Nag\u0142\xf3wek 6","Preformatted":"Wst\u0119pne formatowanie","Div":"","Pre":"","Code":"Kod","Paragraph":"Akapit","Blockquote":"Blok cytatu","Inline":"W tek\u015bcie","Blocks":"Bloki","Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.":"Wklejanie jest w trybie tekstowym. Dop\xf3ki nie wy\u0142\u0105czysz tej opcji, zawarto\u015b\u0107 b\u0119dzie wklejana jako zwyk\u0142y tekst.","Fonts":"Fonty","Font sizes":"Rozmiary czcionek","Class":"Klasa","Browse for an image":"Przegl\u0105daj za zdj\u0119ciem","OR":"LUB","Drop an image here":"Upu\u015b\u0107 obraz tutaj","Upload":"Prze\u015blij","Uploading image":"","Block":"Zablokuj","Align":"Wyr\xf3wnaj","Default":"Domy\u015blnie","Circle":"Ko\u0142o","Disc":"Dysk","Square":"Kwadrat","Lower Alpha":"Ma\u0142e alfanumeryczne","Lower Greek":"Ma\u0142e greckie","Lower Roman":"Ma\u0142e rzymskie","Upper Alpha":"Wielkie alfanumeryczne","Upper Roman":"Wielkie rzymskie","Anchor...":"Kotwica...","Anchor":"","Name":"Nazwa","ID":"","ID should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.":"","You have unsaved changes are you sure you want to navigate away?":"Masz niezapisane zmiany. Czy na pewno chcesz opu\u015bci\u0107 stron\u0119?","Restore last draft":"Przywr\xf3\u0107 ostatni szkic","Special character...":"Znak specjalny...","Special Character":"Znak Specjalny","Source code":"Kod \u017ar\xf3d\u0142owy","Insert/Edit code sample":"Dodaj/Edytuj przyk\u0142adowy kod","Language":"J\u0119zyk","Code sample...":"Przyk\u0142ad kodu...","Left to right":"Od lewej do prawej","Right to left":"Od prawej do lewej","Title":"Tytu\u0142","Fullscreen":"Pe\u0142ny ekran","Action":"Czynno\u015b\u0107","Shortcut":"Skr\xf3t","Help":"Pomoc","Address":"Adres","Focus to menubar":"Aktywuj pasek menu","Focus to toolbar":"Aktywuj pasek narz\u0119dzi","Focus to element path":"Aktywuj \u015bcie\u017ck\u0119 elementu","Focus to contextual toolbar":"Aktywuj pasek narz\u0119dzi menu kontekstowego","Insert link (if link plugin activated)":"Wstaw \u0142\u0105cze (je\u015bli w\u0142\u0105czono dodatek linkuj\u0105cy)","Save (if save plugin activated)":"Zapisz (je\u015bli w\u0142\u0105czono dodatek zapisuj\u0105cy)","Find (if searchreplace plugin activated)":"Znajd\u017a (je\u015bli w\u0142\u0105czono dodatek wyszukuj\u0105cy)","Plugins installed ({0}):":"Zainstalowane dodatki ({0}):","Premium plugins:":"Dodatki Premium:","Learn more...":"Dowiedz si\u0119 wi\u0119cej...","You are using {0}":"U\u017cywasz {0}","Plugins":"Dodatki","Handy Shortcuts":"Przydatne skr\xf3ty","Horizontal line":"Pozioma linia","Insert/edit image":"Wstaw/edytuj obraz","Alternative description":"Alternatywny opis","Accessibility":"Dost\u0119pno\u015b\u0107","Image is decorative":"Obraz jest dekoracyjny","Source":"\u0179r\xf3d\u0142o","Dimensions":"Wymiary","Constrain proportions":"Utrzymuj proporcje","General":"Og\xf3lne","Advanced":"Zaawansowane","Style":"Styl","Vertical space":"Odst\u0119p w pionie","Horizontal space":"Odst\u0119p w poziomie","Border":"Obramowanie","Insert image":"Wstaw obraz","Image...":"Obraz...","Image list":"Lista obraz\xf3w","Resize":"Zmie\u0144 rozmiar","Insert date/time":"Wstaw dat\u0119/godzin\u0119","Date/time":"Data/godzina","Insert/edit link":"Wstaw/edytuj \u0142\u0105cze","Text to display":"Tekst do wy\u015bwietlenia","Url":"URL","Open link in...":"Otw\xf3rz \u0142\u0105cze w...","Current window":"Bie\u017c\u0105ce okno","None":"Brak","New window":"Nowe okno","Open link":"Otw\xf3rz \u0142\u0105cze","Remove link":"Usu\u0144 \u0142\u0105cze","Anchors":"Zakotwiczenia","Link...":"\u0141\u0105cze...","Paste or type a link":"Wklej lub wpisz \u0142\u0105cze","The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?":"Wprowadzony URL wygl\u0105da na adres e-mail. Czy chcesz doda\u0107 wymagany prefiks mailto: ?","The URL you entered seems to be an external link. Do you want to add the required http:// prefix?":"Wprowadzony URL wygl\u0105da na \u0142\u0105cze zewn\u0119trzne. Czy chcesz doda\u0107 http:// jako prefiks?","The URL you entered seems to be an external link. Do you want to add the required https:// prefix?":"Wprowadzony URL wygl\u0105da na \u0142\u0105cze zewn\u0119trzne. Czy chcesz doda\u0107 wymagany prefiks https://?","Link list":"Lista \u0142\u0105czy","Insert video":"Wstaw wideo","Insert/edit video":"Wstaw/edytuj wideo","Insert/edit media":"Wstaw/edytuj multimedia","Alternative source":"Alternatywne \u017ar\xf3d\u0142o","Alternative source URL":"Alternatywny URL \u017ar\xf3d\u0142a","Media poster (Image URL)":"Plakat (URL obrazu)","Paste your embed code below:":"Wklej poni\u017cej kod do osadzenia:","Embed":"Osad\u017a","Media...":"Multimedia...","Nonbreaking space":"Nie\u0142amliwa spacja","Page break":"Podzia\u0142 strony","Paste as text":"Wklej jako tekst","Preview":"Podgl\u0105d","Print":"","Print...":"Drukuj...","Save":"Zapisz","Find":"Znajd\u017a","Replace with":"Zast\u0105p ci\u0105giem:","Replace":"Zast\u0105p","Replace all":"Zast\u0105p wszystkie","Previous":"Poprzedni","Next":"Nast\u0119pny","Find and Replace":"Znajd\u017a i Zamie\u0144","Find and replace...":"Znajd\u017a i zamie\u0144...","Could not find the specified string.":"Nie znaleziono okre\u015blonego tekstu.","Match case":"Uwzgl\u0119dniaj wielko\u015b\u0107 liter","Find whole words only":"Znajd\u017a tylko ca\u0142e wyrazy","Find in selection":"Znajd\u017a w zaznaczeniu","Insert table":"Wstaw tabel\u0119","Table properties":"W\u0142a\u015bciwo\u015bci tabeli","Delete table":"Usu\u0144 tabel\u0119","Cell":"Kom\xf3rka","Row":"Wiersz","Column":"Kolumna","Cell properties":"W\u0142a\u015bciwo\u015bci kom\xf3rki","Merge cells":"Scal kom\xf3rki","Split cell":"Podziel kom\xf3rk\u0119","Insert row before":"Wstaw wiersz przed","Insert row after":"Wstaw wiersz po","Delete row":"Usu\u0144 wiersz","Row properties":"W\u0142a\u015bciwo\u015bci wiersza","Cut row":"Wytnij wiersz","Cut column":"","Copy row":"Kopiuj wiersz","Copy column":"","Paste row before":"Wklej wiersz przed","Paste column before":"","Paste row after":"Wklej wiersz po","Paste column after":"","Insert column before":"Wstaw kolumn\u0119 przed","Insert column after":"Wstaw kolumn\u0119 po","Delete column":"Usu\u0144 kolumn\u0119","Cols":"Kol.","Rows":"Wier.","Width":"Szeroko\u015b\u0107","Height":"Wysoko\u015b\u0107","Cell spacing":"Odst\u0119py kom\xf3rek","Cell padding":"Dope\u0142nienie kom\xf3rki","Row clipboard actions":"","Column clipboard actions":"","Table styles":"","Cell styles":"","Column header":"","Row header":"","Table caption":"","Caption":"Tytu\u0142","Show caption":"Poka\u017c podpis","Left":"Lewo","Center":"\u015arodek","Right":"Prawo","Cell type":"Typ kom\xf3rki","Scope":"Zasi\u0119g","Alignment":"Wyr\xf3wnanie","Horizontal align":"","Vertical align":"","Top":"G\xf3ra","Middle":"\u015arodek","Bottom":"D\xf3\u0142","Header cell":"Kom\xf3rka nag\u0142\xf3wka","Row group":"Grupa wierszy","Column group":"Grupa kolumn","Row type":"Typ wiersza","Header":"Nag\u0142\xf3wek","Body":"Tre\u015b\u0107","Footer":"Stopka","Border color":"Kolor obramowania","Solid":"","Dotted":"","Dashed":"","Double":"","Groove":"","Ridge":"","Inset":"","Outset":"","Hidden":"","Insert template...":"Wstaw szablon...","Templates":"Szablony","Template":"Szablon","Insert Template":"","Text color":"Kolor tekstu","Background color":"Kolor t\u0142a","Custom...":"Niestandardowy...","Custom color":"Kolor niestandardowy","No color":"Bez koloru","Remove color":"Usu\u0144 kolor","Show blocks":"Poka\u017c bloki","Show invisible characters":"Poka\u017c niewidoczne znaki","Word count":"Liczba s\u0142\xf3w","Count":"Liczba","Document":"Dokument","Selection":"Zaznaczenie","Words":"S\u0142owa","Words: {0}":"S\u0142\xf3w: {0}","{0} words":"{0} s\u0142.","File":"Plik","Edit":"Edytuj","Insert":"Wstaw","View":"Wy\u015bwietl","Format":"","Table":"Tabela","Tools":"Narz\u0119dzia","Powered by {0}":"","Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help":"Obszar Edycji. ALT-F9: menu. ALT-F10: pasek narz\u0119dzi. ALT-0: pomoc","Image title":"Tytu\u0142 obrazu","Border width":"Grubo\u015b\u0107 ramki","Border style":"Styl ramki","Error":"B\u0142\u0105d","Warn":"Ostrze\u017cenie","Valid":"Prawid\u0142owe","To open the popup, press Shift+Enter":"Aby otworzy\u0107 okienko, naci\u015bnij Shift+Enter","Rich Text Area":"","Rich Text Area. Press ALT-0 for help.":"Obszar tekstu sformatowanego. Naci\u015bnij ALT-0, aby uzyska\u0107 pomoc.","System Font":"Font systemowy","Failed to upload image: {0}":"Nie uda\u0142o si\u0119 przes\u0142a\u0107 obrazu: {0}","Failed to load plugin: {0} from url {1}":"Nie uda\u0142o si\u0119 za\u0142adowa\u0107 dodatku: {0} spod adresu url {1}","Failed to load plugin url: {0}":"Nie uda\u0142o si\u0119 za\u0142adowa\u0107 adresu url dodatku: {0}","Failed to initialize plugin: {0}":"Nie mo\u017cna zainicjowa\u0107 dodatku: {0}","example":"przyk\u0142ad","Search":"Wyszukaj","All":"Wszystkie","Currency":"Waluta","Text":"Tekst","Quotations":"Cudzys\u0142owy","Mathematical":"Matematyczne","Extended Latin":"Rozszerzony \u0142aci\u0144ski","Symbols":"Symbole","Arrows":"Strza\u0142ki","User Defined":"W\u0142asny","dollar sign":"znak dolara","currency sign":"znak waluty","euro-currency sign":"znak euro","colon sign":"znak colon","cruzeiro sign":"znak cruzeiro","french franc sign":"znak franka francuskiego","lira sign":"znak liry","mill sign":"znak mill","naira sign":"znak nairy","peseta sign":"znak pesety","rupee sign":"znak rupii","won sign":"znak wona","new sheqel sign":"znak nowego szekla","dong sign":"znak donga","kip sign":"znak kipa","tugrik sign":"znak tugrika","drachma sign":"znak drachmy","german penny symbol":"znak feniga","peso sign":"znak peso","guarani sign":"znak guarani","austral sign":"znak australa","hryvnia sign":"znak hrywny","cedi sign":"znak cedi","livre tournois sign":"znak livre tournois","spesmilo sign":"znak spesmilo","tenge sign":"znak tenge","indian rupee sign":"znak rupii indyjskiej","turkish lira sign":"znak liry tureckiej","nordic mark sign":"znak nordic mark","manat sign":"znak manata","ruble sign":"znak rubla","yen character":"znak jena","yuan character":"znak juana","yuan character, in hong kong and taiwan":"znak juana w Hongkongu i na Tajwanie","yen/yuan character variant one":"jen/juan, wariant pierwszy","Emojis":"","Emojis...":"","Loading emojis...":"","Could not load emojis":"","People":"Ludzie","Animals and Nature":"Zwierz\u0119ta i natura","Food and Drink":"Jedzenie i picie","Activity":"Aktywno\u015b\u0107","Travel and Places":"Podr\xf3\u017ce i miejsca","Objects":"Obiekty","Flags":"Flagi","Characters":"Znaki","Characters (no spaces)":"Znaki (bez spacji)","{0} characters":"{0} znak\xf3w","Error: Form submit field collision.":"B\u0142\u0105d: kolizja pola przesy\u0142ania formularza.","Error: No form element found.":"B\u0142\u0105d: nie znaleziono elementu formularza.","Color swatch":"Pr\xf3bka koloru","Color Picker":"Selektor kolor\xf3w","Invalid hex color code: {0}":"","Invalid input":"","R":"","Red component":"","G":"","Green component":"","B":"","Blue component":"","#":"","Hex color code":"","Range 0 to 255":"","Turquoise":"Turkusowy","Green":"Zielony","Blue":"Niebieski","Purple":"Purpurowy","Navy Blue":"Ciemnoniebieski","Dark Turquoise":"Ciemnoturkusowy","Dark Green":"Ciemnozielony","Medium Blue":"\u015arednioniebieski","Medium Purple":"\u015aredniopurpurowy","Midnight Blue":"Nocny b\u0142\u0119kit","Yellow":"\u017b\xf3\u0142ty","Orange":"Pomara\u0144czowy","Red":"Czerwony","Light Gray":"Jasnoszary","Gray":"Szary","Dark Yellow":"Ciemno\u017c\xf3\u0142ty","Dark Orange":"Ciemnopomara\u0144czowy","Dark Red":"Ciemnoczerwony","Medium Gray":"\u015arednioszary","Dark Gray":"Ciemnoszary","Light Green":"Jasnozielony","Light Yellow":"Jasno\u017c\xf3\u0142ty","Light Red":"Jasnoczerwony","Light Purple":"Jasnopurpurowy","Light Blue":"Jasnoniebieski","Dark Purple":"Ciemnopurpurowy","Dark Blue":"Ciemnoniebieski","Black":"Czarny","White":"Bia\u0142y","Switch to or from fullscreen mode":"W\u0142\u0105cz lub wy\u0142\u0105cz tryb pe\u0142noekranowy","Open help dialog":"Otw\xf3rz okno dialogowe pomocy","history":"historia","styles":"style","formatting":"formatowanie","alignment":"wyr\xf3wnanie","indentation":"wci\u0119cie","Font":"","Size":"Rozmiar","More...":"Wi\u0119cej...","Select...":"Wybierz...","Preferences":"Ustawienia","Yes":"Tak","No":"Nie","Keyboard Navigation":"Nawigacja za pomoc\u0105 klawiatury","Version":"Wersja","Code view":"Widok kodu","Open popup menu for split buttons":"Otw\xf3rz menu podr\u0119czne dla przycisk\xf3w","List Properties":"Ustawienia Listy","List properties...":"Ustawienia listy...","Start list at number":"Rozpocznij numeracj\u0119 od","Line height":"Wysoko\u015b\u0107 Linii","Dropped file type is not supported":"","Loading...":"","ImageProxy HTTP error: Rejected request":"","ImageProxy HTTP error: Could not find Image Proxy":"","ImageProxy HTTP error: Incorrect Image Proxy URL":"","ImageProxy HTTP error: Unknown ImageProxy error":""}); \ No newline at end of file