Update Umbraco to 7.12.2
This commit is contained in:
@@ -0,0 +1,219 @@
|
||||
tinymce.addI18n('da',{
|
||||
"Cut": "Klip",
|
||||
"Heading 5": "Overskrift 5",
|
||||
"Header 2": "Overskrift 2",
|
||||
"Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "Din browser underst\u00f8tter ikke direkte adgang til clipboard. Benyt Ctrl+X\/C\/ keybord shortcuts i stedet for.",
|
||||
"Heading 4": "Overskrift 4",
|
||||
"Div": "Div",
|
||||
"Heading 2": "Overskrift 2",
|
||||
"Paste": "Inds\u00e6t",
|
||||
"Close": "Luk",
|
||||
"Font Family": "Skrifttype",
|
||||
"Pre": "Pre",
|
||||
"Align right": "H\u00f8jrejusteret",
|
||||
"New document": "Nyt dokument",
|
||||
"Blockquote": "Indrykning",
|
||||
"Numbered list": "Nummerering",
|
||||
"Heading 1": "Overskrift 1",
|
||||
"Headings": "Overskrifter",
|
||||
"Increase indent": "For\u00f8g indrykning",
|
||||
"Formats": "Formater",
|
||||
"Headers": "Overskrifter",
|
||||
"Select all": "V\u00e6lg alle",
|
||||
"Header 3": "Overskrift 3",
|
||||
"Blocks": "Blokke",
|
||||
"Undo": "Fortryd",
|
||||
"Strikethrough": "Gennemstreg",
|
||||
"Bullet list": "Punkt tegn",
|
||||
"Header 1": "Overskrift 1",
|
||||
"Superscript": "H\u00e6vet",
|
||||
"Clear formatting": "Nulstil formattering",
|
||||
"Font Sizes": "Skriftst\u00f8rrelse",
|
||||
"Subscript": "S\u00e6nket",
|
||||
"Header 6": "Overskrift 6",
|
||||
"Redo": "Genopret",
|
||||
"Paragraph": "S\u00e6tning",
|
||||
"Ok": "Ok",
|
||||
"Bold": "Fed",
|
||||
"Code": "Code",
|
||||
"Italic": "Kursiv",
|
||||
"Align center": "Centreret",
|
||||
"Header 5": "Overskrift 5",
|
||||
"Heading 6": "Overskrift 6",
|
||||
"Heading 3": "Overskrift 3",
|
||||
"Decrease indent": "Formindsk indrykning",
|
||||
"Header 4": "Overskrift 4",
|
||||
"Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.": "S\u00e6t ind er indstillet til at inds\u00e6tte som ren tekst. Indhold bliver nu indsat uden formatering indtil du \u00e6ndrer indstillingen.",
|
||||
"Underline": "Understreg",
|
||||
"Cancel": "Fortryd",
|
||||
"Justify": "Justering",
|
||||
"Inline": "Inline",
|
||||
"Copy": "Kopier",
|
||||
"Align left": "Venstrejusteret",
|
||||
"Visual aids": "Visuel hj\u00e6lp",
|
||||
"Lower Greek": "Lower Gr\u00e6sk",
|
||||
"Square": "Kvadrat",
|
||||
"Default": "Standard",
|
||||
"Lower Alpha": "Lower Alpha",
|
||||
"Circle": "Cirkel",
|
||||
"Disc": "Disk",
|
||||
"Upper Alpha": "Upper Alpha",
|
||||
"Upper Roman": "Upper Roman",
|
||||
"Lower Roman": "Lower Roman",
|
||||
"Name": "Navn",
|
||||
"Anchor": "Anchor",
|
||||
"You have unsaved changes are you sure you want to navigate away?": "Du har ikke gemte \u00e6ndringer. Er du sikker p\u00e5 at du vil forts\u00e6tte?",
|
||||
"Restore last draft": "Genopret sidste kladde",
|
||||
"Special character": "Specielle tegn",
|
||||
"Source code": "Kildekode",
|
||||
"B": "B",
|
||||
"R": "R",
|
||||
"G": "G",
|
||||
"Color": "Farve",
|
||||
"Right to left": "H\u00f8jre til venstre",
|
||||
"Left to right": "Venstre til h\u00f8jre",
|
||||
"Emoticons": "Emot-ikoner",
|
||||
"Robots": "Robotter",
|
||||
"Document properties": "Dokument egenskaber",
|
||||
"Title": "Titel",
|
||||
"Keywords": "S\u00f8geord",
|
||||
"Encoding": "Kodning",
|
||||
"Description": "Beskrivelse",
|
||||
"Author": "Forfatter",
|
||||
"Fullscreen": "Fuldsk\u00e6rm",
|
||||
"Horizontal line": "Vandret linie",
|
||||
"Horizontal space": "Vandret afstand",
|
||||
"Insert\/edit image": "Inds\u00e6t\/ret billede",
|
||||
"General": "Generet",
|
||||
"Advanced": "Avanceret",
|
||||
"Source": "Kilde",
|
||||
"Border": "Kant",
|
||||
"Constrain proportions": "Behold propertioner",
|
||||
"Vertical space": "Lodret afstand",
|
||||
"Image description": "Billede beskrivelse",
|
||||
"Style": "Stil",
|
||||
"Dimensions": "Dimensioner",
|
||||
"Insert image": "Inds\u00e6t billede",
|
||||
"Zoom in": "Zoom ind",
|
||||
"Contrast": "Kontrast",
|
||||
"Back": "Tilbage",
|
||||
"Gamma": "Gamma",
|
||||
"Flip horizontally": "Flip horisontalt",
|
||||
"Resize": "Skaler",
|
||||
"Sharpen": "G\u00f8r skarpere",
|
||||
"Zoom out": "Zoom ud",
|
||||
"Image options": "Billede indstillinger",
|
||||
"Apply": "Anvend",
|
||||
"Brightness": "Lysstyrke",
|
||||
"Rotate clockwise": "Drej med urets retning",
|
||||
"Rotate counterclockwise": "Drej modsat urets retning",
|
||||
"Edit image": "Rediger billede",
|
||||
"Color levels": "Farve niveauer",
|
||||
"Crop": "Besk\u00e6r",
|
||||
"Orientation": "Retning",
|
||||
"Flip vertically": "Flip vertikalt",
|
||||
"Invert": "Inverter",
|
||||
"Insert date\/time": "Inds\u00e6t dato\/klokkeslet",
|
||||
"Remove link": "Fjern link",
|
||||
"Url": "Url",
|
||||
"Text to display": "Vis tekst",
|
||||
"Anchors": "Ankre",
|
||||
"Insert link": "Inds\u00e6t link",
|
||||
"New window": "Nyt vindue",
|
||||
"None": "Ingen",
|
||||
"The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "URLen som du angav ser ud til at v\u00e6re et eksternt link. \u00d8nsker du at tilf\u00f8je det kr\u00e6vede prefiks http:\/\/ ?",
|
||||
"Target": "Target",
|
||||
"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "URLen som du angav ser ud til at v\u00e6re en email adresse. \u00d8nsker du at tilf\u00f8je det kr\u00e6vede prefiks mailto: ?",
|
||||
"Insert\/edit link": "Inds\u00e6t\/ret link",
|
||||
"Insert\/edit video": "Inds\u00e6t\/ret video",
|
||||
"Poster": "Poster",
|
||||
"Alternative source": "Alternativ kilde",
|
||||
"Paste your embed code below:": "Inds\u00e6t din embed kode herunder:",
|
||||
"Insert video": "Inds\u00e6t video",
|
||||
"Embed": "Integrer",
|
||||
"Nonbreaking space": "H\u00e5rdt mellemrum",
|
||||
"Page break": "Sideskift",
|
||||
"Paste as text": "Inds\u00e6t som ren tekst",
|
||||
"Preview": "Forh\u00e5ndsvisning",
|
||||
"Print": "Udskriv",
|
||||
"Save": "Gem",
|
||||
"Could not find the specified string.": "Kunne ikke finde s\u00f8getekst",
|
||||
"Replace": "Erstat",
|
||||
"Next": "N\u00e6ste",
|
||||
"Whole words": "Hele ord",
|
||||
"Find and replace": "Find og erstat",
|
||||
"Replace with": "Erstat med",
|
||||
"Find": "Find",
|
||||
"Replace all": "Erstat alt",
|
||||
"Match case": "STORE og sm\u00e5 bogstaver",
|
||||
"Prev": "Forrige",
|
||||
"Spellcheck": "Stavekontrol",
|
||||
"Finish": "F\u00e6rdig",
|
||||
"Ignore all": "Ignorer alt",
|
||||
"Ignore": "Ignorer",
|
||||
"Add to Dictionary": "Tilf\u00f8j til ordbog",
|
||||
"Insert row before": "Inds\u00e6t r\u00e6kke f\u00f8r",
|
||||
"Rows": "R\u00e6kker",
|
||||
"Height": "H\u00f8jde",
|
||||
"Paste row after": "Inds\u00e6t r\u00e6kke efter",
|
||||
"Alignment": "Tilpasning",
|
||||
"Border color": "Kant farve",
|
||||
"Column group": "Kolonne gruppe",
|
||||
"Row": "R\u00e6kke",
|
||||
"Insert column before": "Inds\u00e6t kolonne f\u00f8r",
|
||||
"Split cell": "Split celle",
|
||||
"Cell padding": "Celle padding",
|
||||
"Cell spacing": "Celle afstand",
|
||||
"Row type": "R\u00e6kke type",
|
||||
"Insert table": "Inds\u00e6t tabel",
|
||||
"Body": "Krop",
|
||||
"Caption": "Tekst",
|
||||
"Footer": "Sidefod",
|
||||
"Delete row": "Slet r\u00e6kke",
|
||||
"Paste row before": "Inds\u00e6t r\u00e6kke f\u00f8r",
|
||||
"Scope": "Anvendelsesomr\u00e5de",
|
||||
"Delete table": "Slet tabel",
|
||||
"H Align": "H juster",
|
||||
"Top": "Top",
|
||||
"Header cell": "Sidehoved celle",
|
||||
"Column": "Kolonne",
|
||||
"Row group": "R\u00e6kke gruppe",
|
||||
"Cell": "Celle",
|
||||
"Middle": "Midt",
|
||||
"Cell type": "Celle type",
|
||||
"Copy row": "Kopier r\u00e6kke",
|
||||
"Row properties": "R\u00e6kke egenskaber",
|
||||
"Table properties": "Tabel egenskaber",
|
||||
"Bottom": "Bund",
|
||||
"V Align": "V juster",
|
||||
"Header": "Sidehoved",
|
||||
"Right": "H\u00f8jre",
|
||||
"Insert column after": "Inds\u00e6t kolonne efter",
|
||||
"Cols": "Kolonne",
|
||||
"Insert row after": "Inds\u00e6t r\u00e6kke efter",
|
||||
"Width": "Bredde",
|
||||
"Cell properties": "Celle egenskaber",
|
||||
"Left": "Venstre",
|
||||
"Cut row": "Klip r\u00e6kke",
|
||||
"Delete column": "Slet kolonne",
|
||||
"Center": "Centrering",
|
||||
"Merge cells": "Flet celler",
|
||||
"Insert template": "Inds\u00e6t skabelon",
|
||||
"Templates": "Skabeloner",
|
||||
"Background color": "Baggrunds farve",
|
||||
"Custom...": "Brugerdefineret...",
|
||||
"Custom color": "Brugerdefineret farve",
|
||||
"No color": "Ingen farve",
|
||||
"Text color": "Tekst farve",
|
||||
"Show blocks": "Vis klokke",
|
||||
"Show invisible characters": "Vis usynlige tegn",
|
||||
"Words: {0}": "Ord: {0}",
|
||||
"Insert": "Inds\u00e6t",
|
||||
"File": "Fil",
|
||||
"Edit": "Rediger",
|
||||
"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "Rich Text omr\u00e5de. Tryk ALT-F9 for menu. Tryk ALT-F10 for toolbar. Tryk ALT-0 for hj\u00e6lp",
|
||||
"Tools": "V\u00e6rkt\u00f8j",
|
||||
"View": "Vis",
|
||||
"Table": "Tabel",
|
||||
"Format": "Format"
|
||||
});
|
||||
@@ -0,0 +1,219 @@
|
||||
tinymce.addI18n('de',{
|
||||
"Cut": "Ausschneiden",
|
||||
"Heading 5": "\u00dcberschrift 5",
|
||||
"Header 2": "\u00dcberschrift 2",
|
||||
"Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "Ihr Browser unterst\u00fctzt leider keinen direkten Zugriff auf die Zwischenablage. Bitte benutzen Sie die Strg + X \/ C \/ V Tastenkombinationen.",
|
||||
"Heading 4": "\u00dcberschrift 4",
|
||||
"Div": "Textblock",
|
||||
"Heading 2": "\u00dcberschrift 2",
|
||||
"Paste": "Einf\u00fcgen",
|
||||
"Close": "Schlie\u00dfen",
|
||||
"Font Family": "Schriftart",
|
||||
"Pre": "Vorformatierter Text",
|
||||
"Align right": "Rechtsb\u00fcndig ausrichten",
|
||||
"New document": "Neues Dokument",
|
||||
"Blockquote": "Zitat",
|
||||
"Numbered list": "Nummerierte Liste",
|
||||
"Heading 1": "\u00dcberschrift 1",
|
||||
"Headings": "\u00dcberschriften",
|
||||
"Increase indent": "Einzug vergr\u00f6\u00dfern",
|
||||
"Formats": "Formate",
|
||||
"Headers": "\u00dcberschriften",
|
||||
"Select all": "Alles ausw\u00e4hlen",
|
||||
"Header 3": "\u00dcberschrift 3",
|
||||
"Blocks": "Absatzformate",
|
||||
"Undo": "R\u00fcckg\u00e4ngig",
|
||||
"Strikethrough": "Durchgestrichen",
|
||||
"Bullet list": "Aufz\u00e4hlung",
|
||||
"Header 1": "\u00dcberschrift 1",
|
||||
"Superscript": "Hochgestellt",
|
||||
"Clear formatting": "Formatierung entfernen",
|
||||
"Font Sizes": "Schriftgr\u00f6\u00dfe",
|
||||
"Subscript": "Tiefgestellt",
|
||||
"Header 6": "\u00dcberschrift 6",
|
||||
"Redo": "Wiederholen",
|
||||
"Paragraph": "Absatz",
|
||||
"Ok": "Ok",
|
||||
"Bold": "Fett",
|
||||
"Code": "Quelltext",
|
||||
"Italic": "Kursiv",
|
||||
"Align center": "Zentriert ausrichten",
|
||||
"Header 5": "\u00dcberschrift 5",
|
||||
"Heading 6": "\u00dcberschrift 6",
|
||||
"Heading 3": "\u00dcberschrift 3",
|
||||
"Decrease indent": "Einzug verkleinern",
|
||||
"Header 4": "\u00dcberschrift 4",
|
||||
"Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.": "Einf\u00fcgen ist nun im einfachen Textmodus. Inhalte werden ab jetzt als unformatierter Text eingef\u00fcgt, bis Sie diese Einstellung wieder ausschalten!",
|
||||
"Underline": "Unterstrichen",
|
||||
"Cancel": "Abbrechen",
|
||||
"Justify": "Blocksatz",
|
||||
"Inline": "Zeichenformate",
|
||||
"Copy": "Kopieren",
|
||||
"Align left": "Linksb\u00fcndig ausrichten",
|
||||
"Visual aids": "Visuelle Hilfen",
|
||||
"Lower Greek": "Griechische Kleinbuchstaben",
|
||||
"Square": "Quadrat",
|
||||
"Default": "Standard",
|
||||
"Lower Alpha": "Kleinbuchstaben",
|
||||
"Circle": "Kreis",
|
||||
"Disc": "Punkt",
|
||||
"Upper Alpha": "Gro\u00dfbuchstaben",
|
||||
"Upper Roman": "R\u00f6mische Zahlen (Gro\u00dfbuchstaben)",
|
||||
"Lower Roman": "R\u00f6mische Zahlen (Kleinbuchstaben)",
|
||||
"Name": "Name",
|
||||
"Anchor": "Textmarke",
|
||||
"You have unsaved changes are you sure you want to navigate away?": "Die \u00c4nderungen wurden noch nicht gespeichert, sind Sie sicher, dass Sie diese Seite verlassen wollen?",
|
||||
"Restore last draft": "Letzten Entwurf wiederherstellen",
|
||||
"Special character": "Sonderzeichen",
|
||||
"Source code": "Quelltext",
|
||||
"B": "B",
|
||||
"R": "R",
|
||||
"G": "G",
|
||||
"Color": "Farbe",
|
||||
"Right to left": "Von rechts nach links",
|
||||
"Left to right": "Von links nach rechts",
|
||||
"Emoticons": "Emoticons",
|
||||
"Robots": "Robots",
|
||||
"Document properties": "Dokumenteigenschaften",
|
||||
"Title": "Titel",
|
||||
"Keywords": "Sch\u00fcsselw\u00f6rter",
|
||||
"Encoding": "Zeichenkodierung",
|
||||
"Description": "Beschreibung",
|
||||
"Author": "Verfasser",
|
||||
"Fullscreen": "Vollbild",
|
||||
"Horizontal line": "Horizontale Linie",
|
||||
"Horizontal space": "Horizontaler Abstand",
|
||||
"Insert\/edit image": "Bild einf\u00fcgen\/bearbeiten",
|
||||
"General": "Allgemein",
|
||||
"Advanced": "Erweitert",
|
||||
"Source": "Quelle",
|
||||
"Border": "Rahmen",
|
||||
"Constrain proportions": "Seitenverh\u00e4ltnis beibehalten",
|
||||
"Vertical space": "Vertikaler Abstand",
|
||||
"Image description": "Bildbeschreibung",
|
||||
"Style": "Stil",
|
||||
"Dimensions": "Abmessungen",
|
||||
"Insert image": "Bild einf\u00fcgen",
|
||||
"Zoom in": "Ansicht vergr\u00f6\u00dfern",
|
||||
"Contrast": "Kontrast",
|
||||
"Back": "Zur\u00fcck",
|
||||
"Gamma": "Gamma",
|
||||
"Flip horizontally": "Horizontal spiegeln",
|
||||
"Resize": "Skalieren",
|
||||
"Sharpen": "Sch\u00e4rfen",
|
||||
"Zoom out": "Ansicht verkleinern",
|
||||
"Image options": "Bildeigenschaften",
|
||||
"Apply": "Anwenden",
|
||||
"Brightness": "Helligkeit",
|
||||
"Rotate clockwise": "Im Uhrzeigersinn drehen",
|
||||
"Rotate counterclockwise": "Gegen den Uhrzeigersinn drehen",
|
||||
"Edit image": "Bild bearbeiten",
|
||||
"Color levels": "Farbwerte",
|
||||
"Crop": "Bescheiden",
|
||||
"Orientation": "Ausrichtung",
|
||||
"Flip vertically": "Vertikal spiegeln",
|
||||
"Invert": "Invertieren",
|
||||
"Insert date\/time": "Datum\/Uhrzeit einf\u00fcgen ",
|
||||
"Remove link": "Link entfernen",
|
||||
"Url": "URL",
|
||||
"Text to display": "Anzuzeigender Text",
|
||||
"Anchors": "Textmarken",
|
||||
"Insert link": "Link einf\u00fcgen",
|
||||
"New window": "Neues Fenster",
|
||||
"None": "Keine",
|
||||
"The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "Diese Adresse scheint ein externer Link zu sein. M\u00f6chten Sie das dazu ben\u00f6tigte \"http:\/\/\" voranstellen?",
|
||||
"Target": "Ziel",
|
||||
"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "Diese Adresse scheint eine E-Mail-Adresse zu sein. M\u00f6chten Sie das dazu ben\u00f6tigte \"mailto:\" voranstellen?",
|
||||
"Insert\/edit link": "Link einf\u00fcgen\/bearbeiten",
|
||||
"Insert\/edit video": "Video einf\u00fcgen\/bearbeiten",
|
||||
"Poster": "Poster",
|
||||
"Alternative source": "Alternative Quelle",
|
||||
"Paste your embed code below:": "F\u00fcgen Sie Ihren Einbettungscode hier ein:",
|
||||
"Insert video": "Video einf\u00fcgen",
|
||||
"Embed": "Einbetten",
|
||||
"Nonbreaking space": "Gesch\u00fctztes Leerzeichen",
|
||||
"Page break": "Seitenumbruch",
|
||||
"Paste as text": "Als Text einf\u00fcgen",
|
||||
"Preview": "Vorschau",
|
||||
"Print": "Drucken",
|
||||
"Save": "Speichern",
|
||||
"Could not find the specified string.": "Die Zeichenfolge wurde nicht gefunden.",
|
||||
"Replace": "Ersetzen",
|
||||
"Next": "Weiter",
|
||||
"Whole words": "Nur ganze W\u00f6rter",
|
||||
"Find and replace": "Suchen und ersetzen",
|
||||
"Replace with": "Ersetzen durch",
|
||||
"Find": "Suchen",
|
||||
"Replace all": "Alles ersetzen",
|
||||
"Match case": "Gro\u00df-\/Kleinschreibung beachten",
|
||||
"Prev": "Zur\u00fcck",
|
||||
"Spellcheck": "Rechtschreibpr\u00fcfung",
|
||||
"Finish": "Ende",
|
||||
"Ignore all": "Alles Ignorieren",
|
||||
"Ignore": "Ignorieren",
|
||||
"Add to Dictionary": "Zum W\u00f6rterbuch hinzuf\u00fcgen",
|
||||
"Insert row before": "Neue Zeile davor einf\u00fcgen ",
|
||||
"Rows": "Zeilen",
|
||||
"Height": "H\u00f6he",
|
||||
"Paste row after": "Zeile danach einf\u00fcgen",
|
||||
"Alignment": "Ausrichtung",
|
||||
"Border color": "Rahmenfarbe",
|
||||
"Column group": "Spaltengruppe",
|
||||
"Row": "Zeile",
|
||||
"Insert column before": "Neue Spalte davor einf\u00fcgen",
|
||||
"Split cell": "Zelle aufteilen",
|
||||
"Cell padding": "Zelleninnenabstand",
|
||||
"Cell spacing": "Zellenabstand",
|
||||
"Row type": "Zeilentyp",
|
||||
"Insert table": "Tabelle einf\u00fcgen",
|
||||
"Body": "Inhalt",
|
||||
"Caption": "Beschriftung",
|
||||
"Footer": "Fu\u00dfzeile",
|
||||
"Delete row": "Zeile l\u00f6schen",
|
||||
"Paste row before": "Zeile davor einf\u00fcgen",
|
||||
"Scope": "G\u00fcltigkeitsbereich",
|
||||
"Delete table": "Tabelle l\u00f6schen",
|
||||
"H Align": "Horizontale Ausrichtung",
|
||||
"Top": "Oben",
|
||||
"Header cell": "Kopfzelle",
|
||||
"Column": "Spalte",
|
||||
"Row group": "Zeilengruppe",
|
||||
"Cell": "Zelle",
|
||||
"Middle": "Mitte",
|
||||
"Cell type": "Zellentyp",
|
||||
"Copy row": "Zeile kopieren",
|
||||
"Row properties": "Zeileneigenschaften",
|
||||
"Table properties": "Tabelleneigenschaften",
|
||||
"Bottom": "Unten",
|
||||
"V Align": "Vertikale Ausrichtung",
|
||||
"Header": "Kopfzeile",
|
||||
"Right": "Rechtsb\u00fcndig",
|
||||
"Insert column after": "Neue Spalte danach einf\u00fcgen",
|
||||
"Cols": "Spalten",
|
||||
"Insert row after": "Neue Zeile danach einf\u00fcgen",
|
||||
"Width": "Breite",
|
||||
"Cell properties": "Zelleneigenschaften",
|
||||
"Left": "Linksb\u00fcndig",
|
||||
"Cut row": "Zeile ausschneiden",
|
||||
"Delete column": "Spalte l\u00f6schen",
|
||||
"Center": "Zentriert",
|
||||
"Merge cells": "Zellen verbinden",
|
||||
"Insert template": "Vorlage einf\u00fcgen ",
|
||||
"Templates": "Vorlagen",
|
||||
"Background color": "Hintergrundfarbe",
|
||||
"Custom...": "Benutzerdefiniert...",
|
||||
"Custom color": "Benutzerdefinierte Farbe",
|
||||
"No color": "Keine Farbe",
|
||||
"Text color": "Textfarbe",
|
||||
"Show blocks": " Bl\u00f6cke anzeigen",
|
||||
"Show invisible characters": "Unsichtbare Zeichen anzeigen",
|
||||
"Words: {0}": "W\u00f6rter: {0}",
|
||||
"Insert": "Einf\u00fcgen",
|
||||
"File": "Datei",
|
||||
"Edit": "Bearbeiten",
|
||||
"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "Rich-Text- Area. Dr\u00fccken Sie ALT-F9 f\u00fcr das Men\u00fc. Dr\u00fccken Sie ALT-F10 f\u00fcr Symbolleiste. Dr\u00fccken Sie ALT-0 f\u00fcr Hilfe",
|
||||
"Tools": "Werkzeuge",
|
||||
"View": "Ansicht",
|
||||
"Table": "Tabelle",
|
||||
"Format": "Format"
|
||||
});
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,219 @@
|
||||
tinymce.addI18n('fi',{
|
||||
"Cut": "Leikkaa",
|
||||
"Heading 5": "Otsikko 5",
|
||||
"Header 2": "Otsikko 2",
|
||||
"Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "Selaimesi ei tue leikep\u00f6yd\u00e4n suoraa k\u00e4ytt\u00e4mist\u00e4. Ole hyv\u00e4 ja k\u00e4yt\u00e4 n\u00e4pp\u00e4imist\u00f6n Ctrl+X\/C\/V n\u00e4pp\u00e4inyhdistelmi\u00e4.",
|
||||
"Heading 4": "Otsikko 4",
|
||||
"Div": "Div",
|
||||
"Heading 2": "Otsikko 2",
|
||||
"Paste": "Liit\u00e4",
|
||||
"Close": "Sulje",
|
||||
"Font Family": "Fontti",
|
||||
"Pre": "Esimuotoiltu",
|
||||
"Align right": "Tasaa oikealle",
|
||||
"New document": "Uusi dokumentti",
|
||||
"Blockquote": "Lainauslohko",
|
||||
"Numbered list": "J\u00e4rjestetty lista",
|
||||
"Heading 1": "Otsikko 1",
|
||||
"Headings": "Otsikot",
|
||||
"Increase indent": "Loitonna",
|
||||
"Formats": "Muotoilut",
|
||||
"Headers": "Otsikot",
|
||||
"Select all": "Valitse kaikki",
|
||||
"Header 3": "Otsikko 3",
|
||||
"Blocks": "Lohkot",
|
||||
"Undo": "Peru",
|
||||
"Strikethrough": "Yliviivaus",
|
||||
"Bullet list": "J\u00e4rjest\u00e4m\u00e4t\u00f6n lista",
|
||||
"Header 1": "Otsikko 1",
|
||||
"Superscript": "Yl\u00e4indeksi",
|
||||
"Clear formatting": "Poista muotoilu",
|
||||
"Font Sizes": "Fonttikoko",
|
||||
"Subscript": "Alaindeksi",
|
||||
"Header 6": "Otsikko 6",
|
||||
"Redo": "Tee uudelleen",
|
||||
"Paragraph": "Kappale",
|
||||
"Ok": "Ok",
|
||||
"Bold": "Lihavointi",
|
||||
"Code": "Koodi",
|
||||
"Italic": "Kursivointi",
|
||||
"Align center": "Keskit\u00e4",
|
||||
"Header 5": "Otsikko 5",
|
||||
"Heading 6": "Otsikko 6",
|
||||
"Heading 3": "Otsikko 3",
|
||||
"Decrease indent": "Sisenn\u00e4",
|
||||
"Header 4": "Otsikko 4",
|
||||
"Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.": "Liitt\u00e4minen on nyt pelk\u00e4n tekstin -tilassa. Sis\u00e4ll\u00f6t liitet\u00e4\u00e4n nyt pelkk\u00e4n\u00e4 tekstin\u00e4, kunnes otat vaihtoehdon pois k\u00e4yt\u00f6st\u00e4.",
|
||||
"Underline": "Alleviivaus",
|
||||
"Cancel": "Peruuta",
|
||||
"Justify": "Tasaa",
|
||||
"Inline": "Samalla rivill\u00e4",
|
||||
"Copy": "Kopioi",
|
||||
"Align left": "Tasaa vasemmalle",
|
||||
"Visual aids": "Visuaaliset neuvot",
|
||||
"Lower Greek": "pienet kirjaimet: \u03b1, \u03b2, \u03b3",
|
||||
"Square": "Neli\u00f6",
|
||||
"Default": "Oletus",
|
||||
"Lower Alpha": "pienet kirjaimet: a, b, c",
|
||||
"Circle": "Pallo",
|
||||
"Disc": "Ympyr\u00e4",
|
||||
"Upper Alpha": "isot kirjaimet: A, B, C",
|
||||
"Upper Roman": "isot kirjaimet: I, II, III",
|
||||
"Lower Roman": "pienet kirjaimet: i, ii, iii",
|
||||
"Name": "Nimi",
|
||||
"Anchor": "Ankkuri",
|
||||
"You have unsaved changes are you sure you want to navigate away?": "Sinulla on tallentamattomia muutoksia, haluatko varmasti siirty\u00e4 toiselle sivulle?",
|
||||
"Restore last draft": "Palauta aiempi luonnos",
|
||||
"Special character": "Erikoismerkki",
|
||||
"Source code": "L\u00e4hdekoodi",
|
||||
"B": "B",
|
||||
"R": "R",
|
||||
"G": "G",
|
||||
"Color": "V\u00e4ri",
|
||||
"Right to left": "Oikealta vasemmalle",
|
||||
"Left to right": "Vasemmalta oikealle",
|
||||
"Emoticons": "Hymi\u00f6t",
|
||||
"Robots": "Robotit",
|
||||
"Document properties": "Dokumentin ominaisuudet",
|
||||
"Title": "Otsikko",
|
||||
"Keywords": "Avainsanat",
|
||||
"Encoding": "Merkist\u00f6",
|
||||
"Description": "Kuvaus",
|
||||
"Author": "Tekij\u00e4",
|
||||
"Fullscreen": "Koko ruutu",
|
||||
"Horizontal line": "Vaakasuora viiva",
|
||||
"Horizontal space": "Horisontaalinen tila",
|
||||
"Insert\/edit image": "Lis\u00e4\u00e4\/muokkaa kuva",
|
||||
"General": "Yleiset",
|
||||
"Advanced": "Lis\u00e4asetukset",
|
||||
"Source": "L\u00e4hde",
|
||||
"Border": "Reunus",
|
||||
"Constrain proportions": "S\u00e4ilyt\u00e4 mittasuhteet",
|
||||
"Vertical space": "Vertikaalinen tila",
|
||||
"Image description": "Kuvaus",
|
||||
"Style": "Tyyli",
|
||||
"Dimensions": "Mittasuhteet",
|
||||
"Insert image": "Lis\u00e4\u00e4 kuva",
|
||||
"Zoom in": "L\u00e4henn\u00e4",
|
||||
"Contrast": "Kontrasti",
|
||||
"Back": "Takaisin",
|
||||
"Gamma": "Gamma",
|
||||
"Flip horizontally": "K\u00e4\u00e4nn\u00e4 vaakasuunnassa",
|
||||
"Resize": "Kuvan koon muutos",
|
||||
"Sharpen": "Ter\u00e4vyys",
|
||||
"Zoom out": "Loitonna",
|
||||
"Image options": "Kuvan asetukset",
|
||||
"Apply": "Aseta",
|
||||
"Brightness": "Kirkkaus",
|
||||
"Rotate clockwise": "Kierr\u00e4 my\u00f6t\u00e4p\u00e4iv\u00e4\u00e4n",
|
||||
"Rotate counterclockwise": "Kierr\u00e4 vastap\u00e4iv\u00e4\u00e4n",
|
||||
"Edit image": "Muokkaa kuvaa",
|
||||
"Color levels": "V\u00e4ritasot",
|
||||
"Crop": "Rajaa valintaan",
|
||||
"Orientation": "Suunta",
|
||||
"Flip vertically": "K\u00e4\u00e4nn\u00e4 pystysuunnassa",
|
||||
"Invert": "K\u00e4\u00e4nteinen",
|
||||
"Insert date\/time": "Lis\u00e4\u00e4 p\u00e4iv\u00e4m\u00e4\u00e4r\u00e4 tai aika",
|
||||
"Remove link": "Poista linkki",
|
||||
"Url": "Osoite",
|
||||
"Text to display": "N\u00e4ytett\u00e4v\u00e4 teksti",
|
||||
"Anchors": "Ankkurit",
|
||||
"Insert link": "Lis\u00e4\u00e4 linkki",
|
||||
"New window": "Uusi ikkuna",
|
||||
"None": "Ei mit\u00e4\u00e4n",
|
||||
"The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "Antamasi osoite n\u00e4ytt\u00e4\u00e4 olevan ulkoinen linkki. Haluatko lis\u00e4t\u00e4 osoitteeseen vaaditun http:\/\/ -etuliitteen?",
|
||||
"Target": "Kohde",
|
||||
"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "Antamasi osoite n\u00e4ytt\u00e4\u00e4 olevan s\u00e4hk\u00f6postiosoite. Haluatko lis\u00e4t\u00e4 osoitteeseen vaaditun mailto: -etuliitteen?",
|
||||
"Insert\/edit link": "Lis\u00e4\u00e4\/muokkaa linkki",
|
||||
"Insert\/edit video": "Lis\u00e4\u00e4\/muokkaa video",
|
||||
"Poster": "L\u00e4hett\u00e4j\u00e4",
|
||||
"Alternative source": "Vaihtoehtoinen l\u00e4hde",
|
||||
"Paste your embed code below:": "Liit\u00e4 upotuskoodisi alapuolelle:",
|
||||
"Insert video": "Lis\u00e4\u00e4 video",
|
||||
"Embed": "Upota",
|
||||
"Nonbreaking space": "Sitova v\u00e4lily\u00f6nti",
|
||||
"Page break": "Sivunvaihto",
|
||||
"Paste as text": "Liit\u00e4 tekstin\u00e4",
|
||||
"Preview": "Esikatselu",
|
||||
"Print": "Tulosta",
|
||||
"Save": "Tallenna",
|
||||
"Could not find the specified string.": "Haettua merkkijonoa ei l\u00f6ytynyt.",
|
||||
"Replace": "Korvaa",
|
||||
"Next": "Seur.",
|
||||
"Whole words": "Koko sanat",
|
||||
"Find and replace": "Etsi ja korvaa",
|
||||
"Replace with": "Korvaa",
|
||||
"Find": "Etsi",
|
||||
"Replace all": "Korvaa kaikki",
|
||||
"Match case": "Erota isot ja pienet kirjaimet",
|
||||
"Prev": "Edel.",
|
||||
"Spellcheck": "Oikolue",
|
||||
"Finish": "Lopeta",
|
||||
"Ignore all": "\u00c4l\u00e4 huomioi mit\u00e4\u00e4n",
|
||||
"Ignore": "\u00c4l\u00e4 huomioi",
|
||||
"Add to Dictionary": "Lis\u00e4\u00e4 sanakirjaan",
|
||||
"Insert row before": "Lis\u00e4\u00e4 rivi ennen",
|
||||
"Rows": "Rivit",
|
||||
"Height": "Korkeus",
|
||||
"Paste row after": "Liit\u00e4 rivi j\u00e4lkeen",
|
||||
"Alignment": "Tasaus",
|
||||
"Border color": "Reunuksen v\u00e4ri",
|
||||
"Column group": "Sarakeryhm\u00e4",
|
||||
"Row": "Rivi",
|
||||
"Insert column before": "Lis\u00e4\u00e4 rivi ennen",
|
||||
"Split cell": "Jaa solu",
|
||||
"Cell padding": "Solun tyhj\u00e4 tila",
|
||||
"Cell spacing": "Solun v\u00e4li",
|
||||
"Row type": "Rivityyppi",
|
||||
"Insert table": "Lis\u00e4\u00e4 taulukko",
|
||||
"Body": "Runko",
|
||||
"Caption": "Seloste",
|
||||
"Footer": "Alaosa",
|
||||
"Delete row": "Poista rivi",
|
||||
"Paste row before": "Liit\u00e4 rivi ennen",
|
||||
"Scope": "Laajuus",
|
||||
"Delete table": "Poista taulukko",
|
||||
"H Align": "H tasaus",
|
||||
"Top": "Yl\u00e4reuna",
|
||||
"Header cell": "Otsikkosolu",
|
||||
"Column": "Sarake",
|
||||
"Row group": "Riviryhm\u00e4",
|
||||
"Cell": "Solu",
|
||||
"Middle": "Keskikohta",
|
||||
"Cell type": "Solun tyyppi",
|
||||
"Copy row": "Kopioi rivi",
|
||||
"Row properties": "Rivin ominaisuudet",
|
||||
"Table properties": "Taulukon ominaisuudet",
|
||||
"Bottom": "Alareuna",
|
||||
"V Align": "V tasaus",
|
||||
"Header": "Otsikko",
|
||||
"Right": "Oikea",
|
||||
"Insert column after": "Lis\u00e4\u00e4 rivi j\u00e4lkeen",
|
||||
"Cols": "Sarakkeet",
|
||||
"Insert row after": "Lis\u00e4\u00e4 rivi j\u00e4lkeen",
|
||||
"Width": "Leveys",
|
||||
"Cell properties": "Solun ominaisuudet",
|
||||
"Left": "Vasen",
|
||||
"Cut row": "Leikkaa rivi",
|
||||
"Delete column": "Poista sarake",
|
||||
"Center": "Keskell\u00e4",
|
||||
"Merge cells": "Yhdist\u00e4 solut",
|
||||
"Insert template": "Lis\u00e4\u00e4 pohja",
|
||||
"Templates": "Pohjat",
|
||||
"Background color": "Taustan v\u00e4ri",
|
||||
"Custom...": "Mukauta...",
|
||||
"Custom color": "Mukautettu v\u00e4ri",
|
||||
"No color": "Ei v\u00e4ri\u00e4",
|
||||
"Text color": "Tekstin v\u00e4ri",
|
||||
"Show blocks": "N\u00e4yt\u00e4 lohkot",
|
||||
"Show invisible characters": "N\u00e4yt\u00e4 n\u00e4kym\u00e4tt\u00f6m\u00e4t merkit",
|
||||
"Words: {0}": "Sanat: {0}",
|
||||
"Insert": "Lis\u00e4\u00e4",
|
||||
"File": "Tiedosto",
|
||||
"Edit": "Muokkaa",
|
||||
"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "Rikastetun tekstin alue. Paina ALT-F9 valikkoon. Paina ALT-F10 ty\u00f6kaluriviin. Paina ALT-0 ohjeeseen.",
|
||||
"Tools": "Ty\u00f6kalut",
|
||||
"View": "N\u00e4yt\u00e4",
|
||||
"Table": "Taulukko",
|
||||
"Format": "Muotoilu"
|
||||
});
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,219 @@
|
||||
tinymce.addI18n('it',{
|
||||
"Cut": "Taglia",
|
||||
"Heading 5": "Intestazione 5",
|
||||
"Header 2": "Header 2",
|
||||
"Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "Il tuo browser non supporta l'accesso diretto negli Appunti. Per favore usa i tasti di scelta rapida Ctrl+X\/C\/V.",
|
||||
"Heading 4": "Intestazione 4",
|
||||
"Div": "Div",
|
||||
"Heading 2": "Intestazione 2",
|
||||
"Paste": "Incolla",
|
||||
"Close": "Chiudi",
|
||||
"Font Family": "Famiglia font",
|
||||
"Pre": "Pre",
|
||||
"Align right": "Allinea a Destra",
|
||||
"New document": "Nuovo Documento",
|
||||
"Blockquote": "Blockquote",
|
||||
"Numbered list": "Elenchi Numerati",
|
||||
"Heading 1": "Intestazione 1",
|
||||
"Headings": "Intestazioni",
|
||||
"Increase indent": "Aumenta Rientro",
|
||||
"Formats": "Formattazioni",
|
||||
"Headers": "Intestazioni",
|
||||
"Select all": "Seleziona Tutto",
|
||||
"Header 3": "Intestazione 3",
|
||||
"Blocks": "Blocchi",
|
||||
"Undo": "Indietro",
|
||||
"Strikethrough": "Barrato",
|
||||
"Bullet list": "Elenchi Puntati",
|
||||
"Header 1": "Intestazione 1",
|
||||
"Superscript": "Apice",
|
||||
"Clear formatting": "Cancella Formattazione",
|
||||
"Font Sizes": "Dimensioni font",
|
||||
"Subscript": "Pedice",
|
||||
"Header 6": "Intestazione 6",
|
||||
"Redo": "Ripeti",
|
||||
"Paragraph": "Paragrafo",
|
||||
"Ok": "Ok",
|
||||
"Bold": "Grassetto",
|
||||
"Code": "Codice",
|
||||
"Italic": "Corsivo",
|
||||
"Align center": "Allinea al Cento",
|
||||
"Header 5": "Intestazione 5",
|
||||
"Heading 6": "Intestazione 6",
|
||||
"Heading 3": "Intestazione 3",
|
||||
"Decrease indent": "Riduci Rientro",
|
||||
"Header 4": "Intestazione 4",
|
||||
"Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.": "Incolla \u00e8 in modalit\u00e0 testo normale. I contenuti sono incollati come testo normale se non disattivi l'opzione.",
|
||||
"Underline": "Sottolineato",
|
||||
"Cancel": "Annulla",
|
||||
"Justify": "Giustifica",
|
||||
"Inline": "Inlinea",
|
||||
"Copy": "Copia",
|
||||
"Align left": "Allinea a Sinistra",
|
||||
"Visual aids": "Elementi Visivi",
|
||||
"Lower Greek": "Greek Minore",
|
||||
"Square": "Quadrato",
|
||||
"Default": "Default",
|
||||
"Lower Alpha": "Alpha Minore",
|
||||
"Circle": "Cerchio",
|
||||
"Disc": "Disco",
|
||||
"Upper Alpha": "Alpha Superiore",
|
||||
"Upper Roman": "Roman Superiore",
|
||||
"Lower Roman": "Roman Minore",
|
||||
"Name": "Nome",
|
||||
"Anchor": "Fissa",
|
||||
"You have unsaved changes are you sure you want to navigate away?": "Non hai salvato delle modifiche, sei sicuro di andartene?",
|
||||
"Restore last draft": "Ripristina l'ultima bozza.",
|
||||
"Special character": "Carattere Speciale",
|
||||
"Source code": "Codice Sorgente",
|
||||
"B": "B",
|
||||
"R": "R",
|
||||
"G": "G",
|
||||
"Color": "Colore",
|
||||
"Right to left": "Da Destra a Sinistra",
|
||||
"Left to right": "Da Sinistra a Destra",
|
||||
"Emoticons": "Emoction",
|
||||
"Robots": "Robot",
|
||||
"Document properties": "Propriet\u00e0 Documento",
|
||||
"Title": "Titolo",
|
||||
"Keywords": "Parola Chiave",
|
||||
"Encoding": "Codifica",
|
||||
"Description": "Descrizione",
|
||||
"Author": "Autore",
|
||||
"Fullscreen": "Schermo Intero",
|
||||
"Horizontal line": "Linea Orizzontale",
|
||||
"Horizontal space": "Spazio Orizzontale",
|
||||
"Insert\/edit image": "Aggiungi\/Modifica Immagine",
|
||||
"General": "Generale",
|
||||
"Advanced": "Avanzato",
|
||||
"Source": "Fonte",
|
||||
"Border": "Bordo",
|
||||
"Constrain proportions": "Mantieni Proporzioni",
|
||||
"Vertical space": "Spazio Verticale",
|
||||
"Image description": "Descrizione Immagine",
|
||||
"Style": "Stile",
|
||||
"Dimensions": "Dimenzioni",
|
||||
"Insert image": "Inserisci immagine",
|
||||
"Zoom in": "Ingrandisci",
|
||||
"Contrast": "Contrasto",
|
||||
"Back": "Indietro",
|
||||
"Gamma": "Gamma",
|
||||
"Flip horizontally": "Rifletti orizzontalmente",
|
||||
"Resize": "Ridimensiona",
|
||||
"Sharpen": "Contrasta",
|
||||
"Zoom out": "Rimpicciolisci",
|
||||
"Image options": "Opzioni immagine",
|
||||
"Apply": "Applica",
|
||||
"Brightness": "Luminosit\u00e0",
|
||||
"Rotate clockwise": "Ruota in senso orario",
|
||||
"Rotate counterclockwise": "Ruota in senso antiorario",
|
||||
"Edit image": "Modifica immagine",
|
||||
"Color levels": "Livelli colore",
|
||||
"Crop": "Taglia",
|
||||
"Orientation": "Orientamento",
|
||||
"Flip vertically": "Rifletti verticalmente",
|
||||
"Invert": "Inverti",
|
||||
"Insert date\/time": "Inserisci Data\/Ora",
|
||||
"Remove link": "Rimuovi link",
|
||||
"Url": "Url",
|
||||
"Text to display": "Testo da Visualizzare",
|
||||
"Anchors": "Anchors",
|
||||
"Insert link": "Inserisci il Link",
|
||||
"New window": "Nuova Finestra",
|
||||
"None": "No",
|
||||
"The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "L'URL inserito sembra essere un collegamento esterno. Vuoi aggiungere il prefisso necessario http:\/\/?",
|
||||
"Target": "Target",
|
||||
"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "L'URL inserito sembra essere un indirizzo email. Vuoi aggiungere il prefisso necessario mailto:?",
|
||||
"Insert\/edit link": "Inserisci\/Modifica Link",
|
||||
"Insert\/edit video": "Inserisci\/Modifica Video",
|
||||
"Poster": "Anteprima",
|
||||
"Alternative source": "Alternativo",
|
||||
"Paste your embed code below:": "Incolla il codice d'incorporamento qui:",
|
||||
"Insert video": "Inserisci Video",
|
||||
"Embed": "Incorporare",
|
||||
"Nonbreaking space": "Spazio unificatore",
|
||||
"Page break": "Interruzione di pagina",
|
||||
"Paste as text": "incolla come testo",
|
||||
"Preview": "Anteprima",
|
||||
"Print": "Stampa",
|
||||
"Save": "Salva",
|
||||
"Could not find the specified string.": "Impossibile trovare la parola specifica.",
|
||||
"Replace": "Sostituisci",
|
||||
"Next": "Successivo",
|
||||
"Whole words": "Parole Sbagliate",
|
||||
"Find and replace": "Trova e Sostituisci",
|
||||
"Replace with": "Sostituisci Con",
|
||||
"Find": "Trova",
|
||||
"Replace all": "Sostituisci Tutto",
|
||||
"Match case": "Maiuscole\/Minuscole ",
|
||||
"Prev": "Precedente",
|
||||
"Spellcheck": "Controllo ortografico",
|
||||
"Finish": "Termina",
|
||||
"Ignore all": "Ignora Tutto",
|
||||
"Ignore": "Ignora",
|
||||
"Add to Dictionary": "Aggiungi al Dizionario",
|
||||
"Insert row before": "Inserisci una Riga Prima",
|
||||
"Rows": "Righe",
|
||||
"Height": "Altezza",
|
||||
"Paste row after": "Incolla una Riga Dopo",
|
||||
"Alignment": "Allineamento",
|
||||
"Border color": "Colore bordo",
|
||||
"Column group": "Gruppo di Colonne",
|
||||
"Row": "Riga",
|
||||
"Insert column before": "Inserisci una Colonna Prima",
|
||||
"Split cell": "Dividi Cella",
|
||||
"Cell padding": "Padding della Cella",
|
||||
"Cell spacing": "Spaziatura della Cella",
|
||||
"Row type": "Tipo di Riga",
|
||||
"Insert table": "Inserisci Tabella",
|
||||
"Body": "Body",
|
||||
"Caption": "Didascalia",
|
||||
"Footer": "Footer",
|
||||
"Delete row": "Cancella Riga",
|
||||
"Paste row before": "Incolla una Riga Prima",
|
||||
"Scope": "Campo",
|
||||
"Delete table": "Cancella Tabella",
|
||||
"H Align": "Allineamento H",
|
||||
"Top": "In alto",
|
||||
"Header cell": "cella d'intestazione",
|
||||
"Column": "Colonna",
|
||||
"Row group": "Gruppo di Righe",
|
||||
"Cell": "Cella",
|
||||
"Middle": "In mezzo",
|
||||
"Cell type": "Tipo di Cella",
|
||||
"Copy row": "Copia Riga",
|
||||
"Row properties": "Propriet\u00e0 della Riga",
|
||||
"Table properties": "Propiet\u00e0 della Tabella",
|
||||
"Bottom": "In fondo",
|
||||
"V Align": "Allineamento V",
|
||||
"Header": "Header",
|
||||
"Right": "Destra",
|
||||
"Insert column after": "Inserisci una Colonna Dopo",
|
||||
"Cols": "Colonne",
|
||||
"Insert row after": "Inserisci una Riga Dopo",
|
||||
"Width": "Larghezza",
|
||||
"Cell properties": "Propiet\u00e0 della Cella",
|
||||
"Left": "Sinistra",
|
||||
"Cut row": "Taglia Riga",
|
||||
"Delete column": "Cancella Colonna",
|
||||
"Center": "Centro",
|
||||
"Merge cells": "Unisci Cella",
|
||||
"Insert template": "Inserisci Template",
|
||||
"Templates": "Template",
|
||||
"Background color": "Colore Background",
|
||||
"Custom...": "Personalizzato...",
|
||||
"Custom color": "Colore personalizzato",
|
||||
"No color": "Nessun colore",
|
||||
"Text color": "Colore Testo",
|
||||
"Show blocks": "Mostra Blocchi",
|
||||
"Show invisible characters": "Mostra Caratteri Invisibili",
|
||||
"Words: {0}": "Parole: {0}",
|
||||
"Insert": "Inserisci",
|
||||
"File": "File",
|
||||
"Edit": "Modifica",
|
||||
"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "Rich Text Area. Premi ALT-F9 per il men\u00f9. Premi ALT-F10 per la barra degli strumenti. Premi ALT-0 per l'aiuto.",
|
||||
"Tools": "Strumenti",
|
||||
"View": "Visualiza",
|
||||
"Table": "Tabella",
|
||||
"Format": "Formato"
|
||||
});
|
||||
@@ -0,0 +1,219 @@
|
||||
tinymce.addI18n('ja',{
|
||||
"Cut": "\u5207\u308a\u53d6\u308a",
|
||||
"Heading 5": "\u898b\u51fa\u3057 5",
|
||||
"Header 2": "\u30d8\u30c3\u30c0\u30fc 2",
|
||||
"Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "\u304a\u4f7f\u3044\u306e\u30d6\u30e9\u30a6\u30b6\u3067\u306f\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u6a5f\u80fd\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3002\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\uff08Ctrl+X, Ctrl+C, Ctrl+V\uff09\u3092\u304a\u4f7f\u3044\u4e0b\u3055\u3044\u3002",
|
||||
"Heading 4": "\u898b\u51fa\u3057 4",
|
||||
"Div": "Div",
|
||||
"Heading 2": "\u898b\u51fa\u3057 2",
|
||||
"Paste": "\u8cbc\u308a\u4ed8\u3051",
|
||||
"Close": "\u9589\u3058\u308b",
|
||||
"Font Family": "\u30d5\u30a9\u30f3\u30c8\u30d5\u30a1\u30df\u30ea\u30fc",
|
||||
"Pre": "Pre",
|
||||
"Align right": "\u53f3\u5bc4\u305b",
|
||||
"New document": "\u65b0\u898f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8",
|
||||
"Blockquote": "\u5f15\u7528",
|
||||
"Numbered list": "\u756a\u53f7\u4ed8\u304d\u7b87\u6761\u66f8\u304d",
|
||||
"Heading 1": "\u898b\u51fa\u3057 1",
|
||||
"Headings": "\u898b\u51fa\u3057",
|
||||
"Increase indent": "\u30a4\u30f3\u30c7\u30f3\u30c8\u3092\u5897\u3084\u3059",
|
||||
"Formats": "\u66f8\u5f0f",
|
||||
"Headers": "\u30d8\u30c3\u30c0\u30fc",
|
||||
"Select all": "\u5168\u3066\u3092\u9078\u629e",
|
||||
"Header 3": "\u30d8\u30c3\u30c0\u30fc 3",
|
||||
"Blocks": "\u30d6\u30ed\u30c3\u30af",
|
||||
"Undo": "\u5143\u306b\u623b\u3059",
|
||||
"Strikethrough": "\u53d6\u308a\u6d88\u3057\u7dda",
|
||||
"Bullet list": "\u7b87\u6761\u66f8\u304d",
|
||||
"Header 1": "\u30d8\u30c3\u30c0\u30fc 1",
|
||||
"Superscript": "\u4e0a\u4ed8\u304d\u6587\u5b57",
|
||||
"Clear formatting": "\u66f8\u5f0f\u3092\u30af\u30ea\u30a2",
|
||||
"Font Sizes": "\u30d5\u30a9\u30f3\u30c8\u30b5\u30a4\u30ba",
|
||||
"Subscript": "\u4e0b\u4ed8\u304d\u6587\u5b57",
|
||||
"Header 6": "\u30d8\u30c3\u30c0\u30fc 6",
|
||||
"Redo": "\u3084\u308a\u76f4\u3059",
|
||||
"Paragraph": "\u6bb5\u843d",
|
||||
"Ok": "OK",
|
||||
"Bold": "\u592a\u5b57",
|
||||
"Code": "\u30b3\u30fc\u30c9",
|
||||
"Italic": "\u659c\u4f53",
|
||||
"Align center": "\u4e2d\u592e\u63c3\u3048",
|
||||
"Header 5": "\u30d8\u30c3\u30c0\u30fc 5",
|
||||
"Heading 6": "\u898b\u51fa\u3057 6",
|
||||
"Heading 3": "\u898b\u51fa\u3057 3",
|
||||
"Decrease indent": "\u30a4\u30f3\u30c7\u30f3\u30c8\u3092\u6e1b\u3089\u3059",
|
||||
"Header 4": "\u30d8\u30c3\u30c0\u30fc 4",
|
||||
"Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.": "\u8cbc\u308a\u4ed8\u3051\u306f\u73fe\u5728\u30d7\u30ec\u30fc\u30f3\u30c6\u30ad\u30b9\u30c8\u30e2\u30fc\u30c9\u3067\u3059\u3002\u3053\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u30aa\u30d5\u306b\u3057\u306a\u3044\u9650\u308a\u5185\u5bb9\u306f\u30d7\u30ec\u30fc\u30f3\u30c6\u30ad\u30b9\u30c8\u3068\u3057\u3066\u8cbc\u308a\u4ed8\u3051\u3089\u308c\u307e\u3059\u3002",
|
||||
"Underline": "\u4e0b\u7dda",
|
||||
"Cancel": "\u30ad\u30e3\u30f3\u30bb\u30eb",
|
||||
"Justify": "\u4e21\u7aef\u63c3\u3048",
|
||||
"Inline": "\u30a4\u30f3\u30e9\u30a4\u30f3",
|
||||
"Copy": "\u30b3\u30d4\u30fc",
|
||||
"Align left": "\u5de6\u5bc4\u305b",
|
||||
"Visual aids": "\u8868\u306e\u67a0\u7dda\u3092\u70b9\u7dda\u3067\u8868\u793a",
|
||||
"Lower Greek": "\u5c0f\u6587\u5b57\u306e\u30ae\u30ea\u30b7\u30e3\u6587\u5b57",
|
||||
"Square": "\u56db\u89d2",
|
||||
"Default": "\u30c7\u30d5\u30a9\u30eb\u30c8",
|
||||
"Lower Alpha": "\u5c0f\u6587\u5b57\u306e\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8",
|
||||
"Circle": "\u5186",
|
||||
"Disc": "\u70b9",
|
||||
"Upper Alpha": "\u5927\u6587\u5b57\u306e\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8",
|
||||
"Upper Roman": "\u5927\u6587\u5b57\u306e\u30ed\u30fc\u30de\u6570\u5b57",
|
||||
"Lower Roman": "\u5c0f\u6587\u5b57\u306e\u30ed\u30fc\u30de\u6570\u5b57",
|
||||
"Name": "\u30a2\u30f3\u30ab\u30fc\u540d",
|
||||
"Anchor": "\u30a2\u30f3\u30ab\u30fc\uff08\u30ea\u30f3\u30af\u306e\u5230\u9054\u70b9\uff09",
|
||||
"You have unsaved changes are you sure you want to navigate away?": "\u307e\u3060\u4fdd\u5b58\u3057\u3066\u3044\u306a\u3044\u5909\u66f4\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u672c\u5f53\u306b\u3053\u306e\u30da\u30fc\u30b8\u3092\u96e2\u308c\u307e\u3059\u304b\uff1f",
|
||||
"Restore last draft": "\u524d\u56de\u306e\u4e0b\u66f8\u304d\u3092\u5fa9\u6d3b\u3055\u305b\u308b",
|
||||
"Special character": "\u7279\u6b8a\u6587\u5b57",
|
||||
"Source code": "\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9",
|
||||
"B": "B",
|
||||
"R": "R",
|
||||
"G": "G",
|
||||
"Color": "\u30ab\u30e9\u30fc",
|
||||
"Right to left": "\u53f3\u304b\u3089\u5de6",
|
||||
"Left to right": "\u5de6\u304b\u3089\u53f3",
|
||||
"Emoticons": "\u7d75\u6587\u5b57",
|
||||
"Robots": "\u30ed\u30dc\u30c3\u30c4",
|
||||
"Document properties": "\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u30d7\u30ed\u30d1\u30c6\u30a3",
|
||||
"Title": "\u30bf\u30a4\u30c8\u30eb",
|
||||
"Keywords": "\u30ad\u30fc\u30ef\u30fc\u30c9",
|
||||
"Encoding": "\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0",
|
||||
"Description": "\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306e\u5185\u5bb9",
|
||||
"Author": "\u8457\u8005",
|
||||
"Fullscreen": "\u5168\u753b\u9762\u8868\u793a",
|
||||
"Horizontal line": "\u6c34\u5e73\u7f6b\u7dda",
|
||||
"Horizontal space": "\u6a2a\u65b9\u5411\u306e\u4f59\u767d",
|
||||
"Insert\/edit image": "\u753b\u50cf\u306e\u633f\u5165\u30fb\u7de8\u96c6",
|
||||
"General": "\u4e00\u822c",
|
||||
"Advanced": "\u8a73\u7d30\u8a2d\u5b9a",
|
||||
"Source": "\u753b\u50cf\u306e\u30bd\u30fc\u30b9",
|
||||
"Border": "\u67a0\u7dda",
|
||||
"Constrain proportions": "\u7e26\u6a2a\u6bd4\u3092\u4fdd\u6301\u3059\u308b",
|
||||
"Vertical space": "\u7e26\u65b9\u5411\u306e\u4f59\u767d",
|
||||
"Image description": "\u753b\u50cf\u306e\u8aac\u660e\u6587",
|
||||
"Style": "\u30b9\u30bf\u30a4\u30eb",
|
||||
"Dimensions": "\u753b\u50cf\u30b5\u30a4\u30ba\uff08\u6a2a\u30fb\u7e26\uff09",
|
||||
"Insert image": "\u753b\u50cf\u306e\u633f\u5165",
|
||||
"Zoom in": "\u30ba\u30fc\u30e0\u30a4\u30f3",
|
||||
"Contrast": "\u30b3\u30f3\u30c8\u30e9\u30b9\u30c8",
|
||||
"Back": "\u623b\u308b",
|
||||
"Gamma": "\u30ac\u30f3\u30de",
|
||||
"Flip horizontally": "\u6c34\u5e73\u306b\u53cd\u8ee2",
|
||||
"Resize": "\u30ea\u30b5\u30a4\u30ba",
|
||||
"Sharpen": "\u30b7\u30e3\u30fc\u30d7\u5316",
|
||||
"Zoom out": "\u30ba\u30fc\u30e0\u30a2\u30a6\u30c8",
|
||||
"Image options": "\u753b\u50cf\u30aa\u30d7\u30b7\u30e7\u30f3",
|
||||
"Apply": "\u9069\u7528",
|
||||
"Brightness": "\u660e\u308b\u3055",
|
||||
"Rotate clockwise": "\u6642\u8a08\u56de\u308a\u306b\u56de\u8ee2",
|
||||
"Rotate counterclockwise": "\u53cd\u6642\u8a08\u56de\u308a\u306b\u56de\u8ee2",
|
||||
"Edit image": "\u753b\u50cf\u306e\u7de8\u96c6",
|
||||
"Color levels": "\u30ab\u30e9\u30fc\u30ec\u30d9\u30eb",
|
||||
"Crop": "\u30af\u30ed\u30c3\u30d7",
|
||||
"Orientation": "\u5411\u304d",
|
||||
"Flip vertically": "\u4e0a\u4e0b\u306b\u53cd\u8ee2",
|
||||
"Invert": "\u53cd\u8ee2",
|
||||
"Insert date\/time": "\u65e5\u4ed8\u30fb\u6642\u523b",
|
||||
"Remove link": "\u30ea\u30f3\u30af\u306e\u524a\u9664",
|
||||
"Url": "\u30ea\u30f3\u30af\u5148URL",
|
||||
"Text to display": "\u30ea\u30f3\u30af\u5143\u30c6\u30ad\u30b9\u30c8",
|
||||
"Anchors": "\u30a2\u30f3\u30ab\u30fc\uff08\u30ea\u30f3\u30af\u306e\u5230\u9054\u70b9\uff09",
|
||||
"Insert link": "\u30ea\u30f3\u30af",
|
||||
"New window": "\u65b0\u898f\u30a6\u30a3\u30f3\u30c9\u30a6",
|
||||
"None": "\u306a\u3057",
|
||||
"The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "\u5165\u529b\u3055\u308c\u305fURL\u306f\u5916\u90e8\u30ea\u30f3\u30af\u306e\u3088\u3046\u3067\u3059\u3002\u300chttp:\/\/\u300d\u30d7\u30ec\u30d5\u30a3\u30c3\u30af\u30b9\u3092\u8ffd\u52a0\u3057\u307e\u3059\u304b\uff1f",
|
||||
"Target": "\u30bf\u30fc\u30b2\u30c3\u30c8\u5c5e\u6027",
|
||||
"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "\u5165\u529b\u3055\u308c\u305fURL\u306f\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306e\u3088\u3046\u3067\u3059\u3002\u300cmailto:\u300d\u30d7\u30ec\u30d5\u30a3\u30c3\u30af\u30b9\u3092\u8ffd\u52a0\u3057\u307e\u3059\u304b\uff1f",
|
||||
"Insert\/edit link": "\u30ea\u30f3\u30af\u306e\u633f\u5165\u30fb\u7de8\u96c6",
|
||||
"Insert\/edit video": "\u52d5\u753b\u306e\u633f\u5165\u30fb\u7de8\u96c6",
|
||||
"Poster": "\u4ee3\u66ff\u753b\u50cf\u306e\u5834\u6240",
|
||||
"Alternative source": "\u4ee3\u66ff\u52d5\u753b\u306e\u5834\u6240",
|
||||
"Paste your embed code below:": "\u57cb\u3081\u8fbc\u307f\u7528\u30b3\u30fc\u30c9\u3092\u4e0b\u8a18\u306b\u8cbc\u308a\u4ed8\u3051\u3066\u304f\u3060\u3055\u3044\u3002",
|
||||
"Insert video": "\u52d5\u753b",
|
||||
"Embed": "\u57cb\u3081\u8fbc\u307f",
|
||||
"Nonbreaking space": "\u56fa\u5b9a\u30b9\u30da\u30fc\u30b9\uff08 \uff09",
|
||||
"Page break": "\u30da\u30fc\u30b8\u533a\u5207\u308a",
|
||||
"Paste as text": "\u30c6\u30ad\u30b9\u30c8\u3068\u3057\u3066\u8cbc\u308a\u4ed8\u3051",
|
||||
"Preview": "\u30d7\u30ec\u30d3\u30e5\u30fc",
|
||||
"Print": "\u5370\u5237",
|
||||
"Save": "\u4fdd\u5b58",
|
||||
"Could not find the specified string.": "\u304a\u63a2\u3057\u306e\u6587\u5b57\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002",
|
||||
"Replace": "\u7f6e\u304d\u63db\u3048",
|
||||
"Next": "\u6b21",
|
||||
"Whole words": "\u5358\u8a9e\u5358\u4f4d\u3067\u691c\u7d22\u3059\u308b",
|
||||
"Find and replace": "\u691c\u7d22\u3068\u7f6e\u304d\u63db\u3048",
|
||||
"Replace with": "\u7f6e\u304d\u63db\u3048\u308b\u6587\u5b57",
|
||||
"Find": "\u691c\u7d22",
|
||||
"Replace all": "\u5168\u3066\u3092\u7f6e\u304d\u63db\u3048\u308b",
|
||||
"Match case": "\u5927\u6587\u5b57\u30fb\u5c0f\u6587\u5b57\u3092\u533a\u5225\u3059\u308b",
|
||||
"Prev": "\u524d",
|
||||
"Spellcheck": "\u30b9\u30da\u30eb\u30c1\u30a7\u30c3\u30af",
|
||||
"Finish": "\u7d42\u4e86",
|
||||
"Ignore all": "\u5168\u3066\u3092\u7121\u8996",
|
||||
"Ignore": "\u7121\u8996",
|
||||
"Add to Dictionary": "\u8f9e\u66f8\u306b\u8ffd\u52a0",
|
||||
"Insert row before": "\u4e0a\u5074\u306b\u884c\u3092\u633f\u5165",
|
||||
"Rows": "\u884c\u6570",
|
||||
"Height": "\u9ad8\u3055",
|
||||
"Paste row after": "\u4e0b\u5074\u306b\u884c\u3092\u8cbc\u308a\u4ed8\u3051",
|
||||
"Alignment": "\u914d\u7f6e",
|
||||
"Border color": "\u67a0\u7dda\u306e\u8272",
|
||||
"Column group": "\u5217\u30b0\u30eb\u30fc\u30d7",
|
||||
"Row": "\u884c",
|
||||
"Insert column before": "\u5de6\u5074\u306b\u5217\u3092\u633f\u5165",
|
||||
"Split cell": "\u30bb\u30eb\u306e\u5206\u5272",
|
||||
"Cell padding": "\u30bb\u30eb\u5185\u4f59\u767d\uff08\u30d1\u30c7\u30a3\u30f3\u30b0\uff09",
|
||||
"Cell spacing": "\u30bb\u30eb\u306e\u9593\u9694",
|
||||
"Row type": "\u884c\u30bf\u30a4\u30d7",
|
||||
"Insert table": "\u8868\u306e\u633f\u5165",
|
||||
"Body": "\u30dc\u30c7\u30a3\u30fc",
|
||||
"Caption": "\u8868\u984c",
|
||||
"Footer": "\u30d5\u30c3\u30bf\u30fc",
|
||||
"Delete row": "\u884c\u306e\u524a\u9664",
|
||||
"Paste row before": "\u4e0a\u5074\u306b\u884c\u3092\u8cbc\u308a\u4ed8\u3051",
|
||||
"Scope": "\u30b9\u30b3\u30fc\u30d7",
|
||||
"Delete table": "\u8868\u306e\u524a\u9664",
|
||||
"H Align": "\u6c34\u5e73\u65b9\u5411\u306e\u914d\u7f6e",
|
||||
"Top": "\u4e0a",
|
||||
"Header cell": "\u30d8\u30c3\u30c0\u30fc\u30bb\u30eb",
|
||||
"Column": "\u5217",
|
||||
"Row group": "\u884c\u30b0\u30eb\u30fc\u30d7",
|
||||
"Cell": "\u30bb\u30eb",
|
||||
"Middle": "\u4e2d\u592e",
|
||||
"Cell type": "\u30bb\u30eb\u30bf\u30a4\u30d7",
|
||||
"Copy row": "\u884c\u306e\u30b3\u30d4\u30fc",
|
||||
"Row properties": "\u884c\u306e\u8a73\u7d30\u8a2d\u5b9a",
|
||||
"Table properties": "\u8868\u306e\u8a73\u7d30\u8a2d\u5b9a",
|
||||
"Bottom": "\u4e0b",
|
||||
"V Align": "\u5782\u76f4\u65b9\u5411\u306e\u914d\u7f6e",
|
||||
"Header": "\u30d8\u30c3\u30c0\u30fc",
|
||||
"Right": "\u53f3\u5bc4\u305b",
|
||||
"Insert column after": "\u53f3\u5074\u306b\u5217\u3092\u633f\u5165",
|
||||
"Cols": "\u5217\u6570",
|
||||
"Insert row after": "\u4e0b\u5074\u306b\u884c\u3092\u633f\u5165",
|
||||
"Width": "\u5e45",
|
||||
"Cell properties": "\u30bb\u30eb\u306e\u8a73\u7d30\u8a2d\u5b9a",
|
||||
"Left": "\u5de6\u5bc4\u305b",
|
||||
"Cut row": "\u884c\u306e\u5207\u308a\u53d6\u308a",
|
||||
"Delete column": "\u5217\u306e\u524a\u9664",
|
||||
"Center": "\u4e2d\u592e\u63c3\u3048",
|
||||
"Merge cells": "\u30bb\u30eb\u306e\u7d50\u5408",
|
||||
"Insert template": "\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306e\u633f\u5165",
|
||||
"Templates": "\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u540d",
|
||||
"Background color": "\u80cc\u666f\u8272",
|
||||
"Custom...": "\u30ab\u30b9\u30bf\u30e0...",
|
||||
"Custom color": "\u30ab\u30b9\u30bf\u30e0\u30ab\u30e9\u30fc",
|
||||
"No color": "\u30ab\u30e9\u30fc\u306a\u3057",
|
||||
"Text color": "\u30c6\u30ad\u30b9\u30c8\u306e\u8272",
|
||||
"Show blocks": "\u6587\u7ae0\u306e\u533a\u5207\u308a\u3092\u70b9\u7dda\u3067\u8868\u793a",
|
||||
"Show invisible characters": "\u4e0d\u53ef\u8996\u6587\u5b57\u3092\u8868\u793a",
|
||||
"Words: {0}": "\u5358\u8a9e\u6570: {0}",
|
||||
"Insert": "\u633f\u5165",
|
||||
"File": "\u30d5\u30a1\u30a4\u30eb",
|
||||
"Edit": "\u7de8\u96c6",
|
||||
"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "\u66f8\u5f0f\u4ed8\u304d\u30c6\u30ad\u30b9\u30c8\u306e\u7de8\u96c6\u753b\u9762\u3002ALT-F9\u3067\u30e1\u30cb\u30e5\u30fc\u3001ALT-F10\u3067\u30c4\u30fc\u30eb\u30d0\u30fc\u3001ALT-0\u3067\u30d8\u30eb\u30d7\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002",
|
||||
"Tools": "\u30c4\u30fc\u30eb",
|
||||
"View": "\u8868\u793a",
|
||||
"Table": "\u8868",
|
||||
"Format": "\u66f8\u5f0f"
|
||||
});
|
||||
@@ -0,0 +1,219 @@
|
||||
tinymce.addI18n('nl',{
|
||||
"Cut": "Knippen",
|
||||
"Heading 5": "Kop 5",
|
||||
"Header 2": "Kop 2",
|
||||
"Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "Uw browser ondersteunt geen toegang tot het clipboard. Gelieve ctrl+X\/C\/V sneltoetsen te gebruiken.",
|
||||
"Heading 4": "Kop 4",
|
||||
"Div": "Div",
|
||||
"Heading 2": "Kop 2",
|
||||
"Paste": "Plakken",
|
||||
"Close": "Sluiten",
|
||||
"Font Family": "Lettertype",
|
||||
"Pre": "Pre",
|
||||
"Align right": "Rechts uitlijnen",
|
||||
"New document": "Nieuw document",
|
||||
"Blockquote": "Quote",
|
||||
"Numbered list": "Nummering",
|
||||
"Heading 1": "Kop 1",
|
||||
"Headings": "Koppen",
|
||||
"Increase indent": "Inspringen vergroten",
|
||||
"Formats": "Opmaak",
|
||||
"Headers": "Kopteksten",
|
||||
"Select all": "Alles selecteren",
|
||||
"Header 3": "Kop 3",
|
||||
"Blocks": "Blok",
|
||||
"Undo": "Ongedaan maken",
|
||||
"Strikethrough": "Doorhalen",
|
||||
"Bullet list": "Opsommingsteken",
|
||||
"Header 1": "Kop 1",
|
||||
"Superscript": "Superscript",
|
||||
"Clear formatting": "Opmaak verwijderen",
|
||||
"Font Sizes": "Tekengrootte",
|
||||
"Subscript": "Subscript",
|
||||
"Header 6": "Kop 6",
|
||||
"Redo": "Opnieuw",
|
||||
"Paragraph": "Paragraaf",
|
||||
"Ok": "Ok\u00e9",
|
||||
"Bold": "Vet",
|
||||
"Code": "Code",
|
||||
"Italic": "Cursief",
|
||||
"Align center": "Centreren",
|
||||
"Header 5": "Kop 5",
|
||||
"Heading 6": "Kop 6",
|
||||
"Heading 3": "Kop 3",
|
||||
"Decrease indent": "Inspringen verkleinen",
|
||||
"Header 4": "Kop 4",
|
||||
"Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.": "Plakken gebeurt nu als platte tekst. Tekst wordt nu ingevoegd zonder opmaak tot deze optie uitgeschakeld wordt.",
|
||||
"Underline": "Onderstreept",
|
||||
"Cancel": "Annuleren",
|
||||
"Justify": "Uitlijnen",
|
||||
"Inline": "Inlijn",
|
||||
"Copy": "Kopi\u00ebren",
|
||||
"Align left": "Links uitlijnen",
|
||||
"Visual aids": "Hulpmiddelen",
|
||||
"Lower Greek": "Griekse letters",
|
||||
"Square": "Vierkant",
|
||||
"Default": "Standaard",
|
||||
"Lower Alpha": "Kleine letters",
|
||||
"Circle": "Cirkel",
|
||||
"Disc": "Bolletje",
|
||||
"Upper Alpha": "Hoofdletters",
|
||||
"Upper Roman": "Romeinse cijfers groot",
|
||||
"Lower Roman": "Romeinse cijfers klein",
|
||||
"Name": "Naam",
|
||||
"Anchor": "Anker",
|
||||
"You have unsaved changes are you sure you want to navigate away?": "U hebt niet alles opgeslagen bent u zeker dat u de pagina wenst te verlaten?",
|
||||
"Restore last draft": "Herstel het laatste concept",
|
||||
"Special character": "Speciale karakters",
|
||||
"Source code": "Broncode",
|
||||
"B": "Blauw",
|
||||
"R": "Rood",
|
||||
"G": "Groen",
|
||||
"Color": "Kleur",
|
||||
"Right to left": "Rechts naar links",
|
||||
"Left to right": "Links naar rechts",
|
||||
"Emoticons": "Emoticons",
|
||||
"Robots": "Robots",
|
||||
"Document properties": "Document eigenschappen",
|
||||
"Title": "Titel",
|
||||
"Keywords": "Sleutelwoorden",
|
||||
"Encoding": "Codering",
|
||||
"Description": "Omschrijving",
|
||||
"Author": "Auteur",
|
||||
"Fullscreen": "Volledig scherm",
|
||||
"Horizontal line": "Horizontale lijn",
|
||||
"Horizontal space": "Horizontale ruimte",
|
||||
"Insert\/edit image": "Afbeelding invoegen\/bewerken",
|
||||
"General": "Algemeen",
|
||||
"Advanced": "Geavanceerd",
|
||||
"Source": "Bron",
|
||||
"Border": "Rand",
|
||||
"Constrain proportions": "Verhoudingen behouden",
|
||||
"Vertical space": "Verticale ruimte",
|
||||
"Image description": "Afbeelding omschrijving",
|
||||
"Style": "Stijl",
|
||||
"Dimensions": "Afmetingen",
|
||||
"Insert image": "Afbeelding invoegen",
|
||||
"Zoom in": "Inzoomen",
|
||||
"Contrast": "Contrast",
|
||||
"Back": "Terug",
|
||||
"Gamma": "Gamma",
|
||||
"Flip horizontally": "Horizontaal spiegelen",
|
||||
"Resize": "Formaat aanpassen",
|
||||
"Sharpen": "Scherpte",
|
||||
"Zoom out": "Uitzoomen",
|
||||
"Image options": "Afbeelding opties",
|
||||
"Apply": "Toepassen",
|
||||
"Brightness": "Helderheid",
|
||||
"Rotate clockwise": "Rechtsom draaien",
|
||||
"Rotate counterclockwise": "Linksom draaien",
|
||||
"Edit image": "Bewerk afbeelding",
|
||||
"Color levels": "Kleurniveau's",
|
||||
"Crop": "Uitsnijden",
|
||||
"Orientation": "Orientatie",
|
||||
"Flip vertically": "Verticaal spiegelen",
|
||||
"Invert": "Omkeren",
|
||||
"Insert date\/time": "Voeg datum\/tijd in",
|
||||
"Remove link": "Link verwijderen",
|
||||
"Url": "Url",
|
||||
"Text to display": "Linktekst",
|
||||
"Anchors": "Anker",
|
||||
"Insert link": "Hyperlink invoegen",
|
||||
"New window": "Nieuw venster",
|
||||
"None": "Geen",
|
||||
"The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "De ingegeven URL verwijst naar een extern adres. Wil je er \"http:\/\/\" aan toevoegen?",
|
||||
"Target": "Doel",
|
||||
"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "De ingegeven URL lijkt op een e-mailadres. Wil je er \"mailto:\" aan toevoegen?",
|
||||
"Insert\/edit link": "Hyperlink invoegen\/bewerken",
|
||||
"Insert\/edit video": "Video invoegen\/bewerken",
|
||||
"Poster": "Poster",
|
||||
"Alternative source": "Alternatieve bron",
|
||||
"Paste your embed code below:": "Plak u in te sluiten code hieronder:",
|
||||
"Insert video": "Video invoegen",
|
||||
"Embed": "Insluiten",
|
||||
"Nonbreaking space": "Vaste spatie invoegen",
|
||||
"Page break": "Pagina einde",
|
||||
"Paste as text": "Plakken als tekst",
|
||||
"Preview": "Voorbeeld",
|
||||
"Print": "Print",
|
||||
"Save": "Opslaan",
|
||||
"Could not find the specified string.": "Geen resultaten gevonden",
|
||||
"Replace": "Vervangen",
|
||||
"Next": "Volgende",
|
||||
"Whole words": "Alleen hele woorden",
|
||||
"Find and replace": "Zoek en vervang",
|
||||
"Replace with": "Vervangen door",
|
||||
"Find": "Zoeken",
|
||||
"Replace all": "Alles vervangen",
|
||||
"Match case": "Identieke hoofd\/kleine letters",
|
||||
"Prev": "Vorige",
|
||||
"Spellcheck": "Spellingscontrole",
|
||||
"Finish": "Einde",
|
||||
"Ignore all": "Alles negeren",
|
||||
"Ignore": "Negeren",
|
||||
"Add to Dictionary": "Toevoegen aan woordenlijst",
|
||||
"Insert row before": "Voeg rij boven toe",
|
||||
"Rows": "Rijen",
|
||||
"Height": "Hoogte",
|
||||
"Paste row after": "Plak rij onder",
|
||||
"Alignment": "Uitlijning",
|
||||
"Border color": "Randkleur",
|
||||
"Column group": "Kolomgroep",
|
||||
"Row": "Rij",
|
||||
"Insert column before": "Voeg kolom in voor",
|
||||
"Split cell": "Cel splitsen",
|
||||
"Cell padding": "Ruimte binnen cel",
|
||||
"Cell spacing": "Celruimte",
|
||||
"Row type": "Rijtype",
|
||||
"Insert table": "Tabel invoegen",
|
||||
"Body": "Body",
|
||||
"Caption": "Onderschrift",
|
||||
"Footer": "Voettekst",
|
||||
"Delete row": "Verwijder rij",
|
||||
"Paste row before": "Plak rij boven",
|
||||
"Scope": "Bereik",
|
||||
"Delete table": "Verwijder tabel",
|
||||
"H Align": "Links uitlijnen",
|
||||
"Top": "Bovenaan",
|
||||
"Header cell": "Kopcel",
|
||||
"Column": "Kolom",
|
||||
"Row group": "Rijgroep",
|
||||
"Cell": "Cel",
|
||||
"Middle": "Centreren",
|
||||
"Cell type": "Celtype",
|
||||
"Copy row": "Kopieer rij",
|
||||
"Row properties": "Rij eigenschappen",
|
||||
"Table properties": "Tabel eigenschappen",
|
||||
"Bottom": "Onderaan",
|
||||
"V Align": "Boven uitlijnen",
|
||||
"Header": "Koptekst",
|
||||
"Right": "Rechts",
|
||||
"Insert column after": "Voeg kolom in na",
|
||||
"Cols": "Kolommen",
|
||||
"Insert row after": "Voeg rij onder toe",
|
||||
"Width": "Breedte",
|
||||
"Cell properties": "Cel eigenschappen",
|
||||
"Left": "Links",
|
||||
"Cut row": "Knip rij",
|
||||
"Delete column": "Verwijder kolom",
|
||||
"Center": "Midden",
|
||||
"Merge cells": "Cellen samenvoegen",
|
||||
"Insert template": "Sjabloon invoegen",
|
||||
"Templates": "Sjablonen",
|
||||
"Background color": "Achtergrondkleur",
|
||||
"Custom...": "Eigen...",
|
||||
"Custom color": "Eigen kleur",
|
||||
"No color": "Geen kleur",
|
||||
"Text color": "Tekstkleur",
|
||||
"Show blocks": "Blokken tonen",
|
||||
"Show invisible characters": "Onzichtbare karakters tonen",
|
||||
"Words: {0}": "Woorden: {0}",
|
||||
"Insert": "Invoegen",
|
||||
"File": "Bestand",
|
||||
"Edit": "Bewerken",
|
||||
"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "Rich Text Area. Druk ALT-F9 voor het menu. Druk ALT-F10 voor de toolbar. Druk ALT-0 voor help.",
|
||||
"Tools": "Gereedschap",
|
||||
"View": "Beeld",
|
||||
"Table": "Tabel",
|
||||
"Format": "Opmaak"
|
||||
});
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,219 @@
|
||||
tinymce.addI18n('pl',{
|
||||
"Cut": "Wytnij",
|
||||
"Heading 5": "Nag\u0142\u00f3wek 5",
|
||||
"Header 2": "Nag\u0142\u00f3wek 2",
|
||||
"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.",
|
||||
"Heading 4": "Nag\u0142\u00f3wek 4",
|
||||
"Div": "Div",
|
||||
"Heading 2": "Nag\u0142\u00f3wek 2",
|
||||
"Paste": "Wklej",
|
||||
"Close": "Zamknij",
|
||||
"Font Family": "Kr\u00f3j fontu",
|
||||
"Pre": "Sformatowany tekst",
|
||||
"Align right": "Wyr\u00f3wnaj do prawej",
|
||||
"New document": "Nowy dokument",
|
||||
"Blockquote": "Blok cytatu",
|
||||
"Numbered list": "Lista numerowana",
|
||||
"Heading 1": "Nag\u0142\u00f3wek 1",
|
||||
"Headings": "Nag\u0142\u00f3wki",
|
||||
"Increase indent": "Zwi\u0119ksz wci\u0119cie",
|
||||
"Formats": "Formaty",
|
||||
"Headers": "Nag\u0142\u00f3wki",
|
||||
"Select all": "Zaznacz wszystko",
|
||||
"Header 3": "Nag\u0142\u00f3wek 3",
|
||||
"Blocks": "Bloki",
|
||||
"Undo": "Cofnij",
|
||||
"Strikethrough": "Przekre\u015blenie",
|
||||
"Bullet list": "Lista wypunktowana",
|
||||
"Header 1": "Nag\u0142\u00f3wek 1",
|
||||
"Superscript": "Indeks g\u00f3rny",
|
||||
"Clear formatting": "Wyczy\u015b\u0107 formatowanie",
|
||||
"Font Sizes": "Rozmiar fontu",
|
||||
"Subscript": "Indeks dolny",
|
||||
"Header 6": "Nag\u0142\u00f3wek 6",
|
||||
"Redo": "Pon\u00f3w",
|
||||
"Paragraph": "Akapit",
|
||||
"Ok": "Ok",
|
||||
"Bold": "Pogrubienie",
|
||||
"Code": "Kod \u017ar\u00f3d\u0142owy",
|
||||
"Italic": "Kursywa",
|
||||
"Align center": "Wyr\u00f3wnaj do \u015brodka",
|
||||
"Header 5": "Nag\u0142\u00f3wek 5",
|
||||
"Heading 6": "Nag\u0142\u00f3wek 6",
|
||||
"Heading 3": "Nag\u0142\u00f3wek 3",
|
||||
"Decrease indent": "Zmniejsz wci\u0119cie",
|
||||
"Header 4": "Nag\u0142\u00f3wek 4",
|
||||
"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. Zawarto\u015b\u0107 zostanie wklejona jako zwyk\u0142y tekst dop\u00f3ki nie wy\u0142\u0105czysz tej opcji.",
|
||||
"Underline": "Podkre\u015blenie",
|
||||
"Cancel": "Anuluj",
|
||||
"Justify": "Do lewej i prawej",
|
||||
"Inline": "W tek\u015bcie",
|
||||
"Copy": "Kopiuj",
|
||||
"Align left": "Wyr\u00f3wnaj do lewej",
|
||||
"Visual aids": "Pomoce wizualne",
|
||||
"Lower Greek": "Ma\u0142e greckie",
|
||||
"Square": "Kwadrat",
|
||||
"Default": "Domy\u015blne",
|
||||
"Lower Alpha": "Ma\u0142e litery",
|
||||
"Circle": "K\u00f3\u0142ko",
|
||||
"Disc": "Dysk",
|
||||
"Upper Alpha": "Wielkie litery",
|
||||
"Upper Roman": "Wielkie rzymskie",
|
||||
"Lower Roman": "Ma\u0142e rzymskie",
|
||||
"Name": "Nazwa",
|
||||
"Anchor": "Kotwica",
|
||||
"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\u00f3\u0107 ostatni szkic",
|
||||
"Special character": "Znak specjalny",
|
||||
"Source code": "Kod \u017ar\u00f3d\u0142owy",
|
||||
"B": "B",
|
||||
"R": "R",
|
||||
"G": "G",
|
||||
"Color": "Kolor",
|
||||
"Right to left": "Od prawej do lewej",
|
||||
"Left to right": "Od lewej do prawej",
|
||||
"Emoticons": "Ikony emocji",
|
||||
"Robots": "Roboty",
|
||||
"Document properties": "W\u0142a\u015bciwo\u015bci dokumentu",
|
||||
"Title": "Tytu\u0142",
|
||||
"Keywords": "S\u0142owa kluczowe",
|
||||
"Encoding": "Kodowanie",
|
||||
"Description": "Opis",
|
||||
"Author": "Autor",
|
||||
"Fullscreen": "Pe\u0142ny ekran",
|
||||
"Horizontal line": "Pozioma linia",
|
||||
"Horizontal space": "Odst\u0119p poziomy",
|
||||
"Insert\/edit image": "Wstaw\/edytuj obrazek",
|
||||
"General": "Og\u00f3lne",
|
||||
"Advanced": "Zaawansowane",
|
||||
"Source": "\u0179r\u00f3d\u0142o",
|
||||
"Border": "Ramka",
|
||||
"Constrain proportions": "Zachowaj proporcje",
|
||||
"Vertical space": "Odst\u0119p pionowy",
|
||||
"Image description": "Opis obrazka",
|
||||
"Style": "Styl",
|
||||
"Dimensions": "Wymiary",
|
||||
"Insert image": "Wstaw obrazek",
|
||||
"Zoom in": "Powi\u0119ksz",
|
||||
"Contrast": "Kontrast",
|
||||
"Back": "Cofnij",
|
||||
"Gamma": "Gamma",
|
||||
"Flip horizontally": "Przerzu\u0107 w poziomie",
|
||||
"Resize": "Zmiana rozmiaru",
|
||||
"Sharpen": "Wyostrz",
|
||||
"Zoom out": "Pomniejsz",
|
||||
"Image options": "Opcje obrazu",
|
||||
"Apply": "Zaakceptuj",
|
||||
"Brightness": "Jasno\u015b\u0107",
|
||||
"Rotate clockwise": "Obr\u00f3\u0107 w prawo",
|
||||
"Rotate counterclockwise": "Obr\u00f3\u0107 w lewo",
|
||||
"Edit image": "Edytuj obrazek",
|
||||
"Color levels": "Poziom koloru",
|
||||
"Crop": "Przytnij",
|
||||
"Orientation": "Orientacja",
|
||||
"Flip vertically": "Przerzu\u0107 w pionie",
|
||||
"Invert": "Odwr\u00f3\u0107",
|
||||
"Insert date\/time": "Wstaw dat\u0119\/czas",
|
||||
"Remove link": "Usu\u0144 \u0142\u0105cze",
|
||||
"Url": "URL",
|
||||
"Text to display": "Tekst do wy\u015bwietlenia",
|
||||
"Anchors": "Kotwice",
|
||||
"Insert link": "Wstaw \u0142\u0105cze",
|
||||
"New window": "Nowe okno",
|
||||
"None": "\u017baden",
|
||||
"The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "URL, kt\u00f3ry wprowadzi\u0142e\u015b wygl\u0105da na link zewn\u0119trzny. Czy chcesz doda\u0107 http:\/\/ jako prefiks?",
|
||||
"Target": "Cel",
|
||||
"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "URL, kt\u00f3ry wprowadzi\u0142e\u015b wygl\u0105da na adres e-mail. Czy chcesz doda\u0107 mailto: jako prefiks?",
|
||||
"Insert\/edit link": "Wstaw\/edytuj \u0142\u0105cze",
|
||||
"Insert\/edit video": "Wstaw\/edytuj wideo",
|
||||
"Poster": "Plakat",
|
||||
"Alternative source": "Alternatywne \u017ar\u00f3d\u0142o",
|
||||
"Paste your embed code below:": "Wklej tutaj kod do osadzenia:",
|
||||
"Insert video": "Wstaw wideo",
|
||||
"Embed": "Osad\u017a",
|
||||
"Nonbreaking space": "Nie\u0142amliwa spacja",
|
||||
"Page break": "Podzia\u0142 strony",
|
||||
"Paste as text": "Wklej jako zwyk\u0142y tekst",
|
||||
"Preview": "Podgl\u0105d",
|
||||
"Print": "Drukuj",
|
||||
"Save": "Zapisz",
|
||||
"Could not find the specified string.": "Nie znaleziono szukanego tekstu.",
|
||||
"Replace": "Zamie\u0144",
|
||||
"Next": "Nast.",
|
||||
"Whole words": "Ca\u0142e s\u0142owa",
|
||||
"Find and replace": "Znajd\u017a i zamie\u0144",
|
||||
"Replace with": "Zamie\u0144 na",
|
||||
"Find": "Znajd\u017a",
|
||||
"Replace all": "Zamie\u0144 wszystko",
|
||||
"Match case": "Dopasuj wielko\u015b\u0107 liter",
|
||||
"Prev": "Poprz.",
|
||||
"Spellcheck": "Sprawdzanie pisowni",
|
||||
"Finish": "Zako\u0144cz",
|
||||
"Ignore all": "Ignoruj wszystko",
|
||||
"Ignore": "Ignoruj",
|
||||
"Add to Dictionary": "Dodaj do s\u0142ownika",
|
||||
"Insert row before": "Wstaw wiersz przed",
|
||||
"Rows": "Wiersz.",
|
||||
"Height": "Wysoko\u015b\u0107",
|
||||
"Paste row after": "Wklej wiersz po",
|
||||
"Alignment": "Wyr\u00f3wnanie",
|
||||
"Border color": "Kolor ramki",
|
||||
"Column group": "Grupa kolumn",
|
||||
"Row": "Wiersz",
|
||||
"Insert column before": "Wstaw kolumn\u0119 przed",
|
||||
"Split cell": "Podziel kom\u00f3rk\u0119",
|
||||
"Cell padding": "Dope\u0142nienie kom\u00f3rki",
|
||||
"Cell spacing": "Odst\u0119py kom\u00f3rek",
|
||||
"Row type": "Typ wiersza",
|
||||
"Insert table": "Wstaw tabel\u0119",
|
||||
"Body": "Tre\u015b\u0107",
|
||||
"Caption": "Tytu\u0142",
|
||||
"Footer": "Stopka",
|
||||
"Delete row": "Usu\u0144 wiersz",
|
||||
"Paste row before": "Wklej wiersz przed",
|
||||
"Scope": "Kontekst",
|
||||
"Delete table": "Usu\u0144 tabel\u0119",
|
||||
"H Align": "Wyr\u00f3wnanie w pionie",
|
||||
"Top": "G\u00f3ra",
|
||||
"Header cell": "Kom\u00f3rka nag\u0142\u00f3wka",
|
||||
"Column": "Kolumna",
|
||||
"Row group": "Grupa wierszy",
|
||||
"Cell": "Kom\u00f3rka",
|
||||
"Middle": "\u015arodek",
|
||||
"Cell type": "Typ kom\u00f3rki",
|
||||
"Copy row": "Kopiuj wiersz",
|
||||
"Row properties": "W\u0142a\u015bciwo\u015bci wiersza",
|
||||
"Table properties": "W\u0142a\u015bciwo\u015bci tabeli",
|
||||
"Bottom": "D\u00f3\u0142",
|
||||
"V Align": "Wyr\u00f3wnanie w poziomie",
|
||||
"Header": "Nag\u0142\u00f3wek",
|
||||
"Right": "Prawo",
|
||||
"Insert column after": "Wstaw kolumn\u0119 po",
|
||||
"Cols": "Kol.",
|
||||
"Insert row after": "Wstaw wiersz po",
|
||||
"Width": "Szeroko\u015b\u0107",
|
||||
"Cell properties": "W\u0142a\u015bciwo\u015bci kom\u00f3rki",
|
||||
"Left": "Lewo",
|
||||
"Cut row": "Wytnij wiersz",
|
||||
"Delete column": "Usu\u0144 kolumn\u0119",
|
||||
"Center": "\u015arodek",
|
||||
"Merge cells": "\u0141\u0105cz kom\u00f3rki",
|
||||
"Insert template": "Wstaw szablon",
|
||||
"Templates": "Szablony",
|
||||
"Background color": "Kolor t\u0142a",
|
||||
"Custom...": "Niestandardowy...",
|
||||
"Custom color": "Kolor niestandardowy",
|
||||
"No color": "Bez koloru",
|
||||
"Text color": "Kolor tekstu",
|
||||
"Show blocks": "Poka\u017c bloki",
|
||||
"Show invisible characters": "Poka\u017c niewidoczne znaki",
|
||||
"Words: {0}": "S\u0142\u00f3w: {0}",
|
||||
"Insert": "Wstaw",
|
||||
"File": "Plik",
|
||||
"Edit": "Edycja",
|
||||
"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",
|
||||
"Tools": "Narz\u0119dzia",
|
||||
"View": "Widok",
|
||||
"Table": "Tabela",
|
||||
"Format": "Format"
|
||||
});
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,219 @@
|
||||
tinymce.addI18n('ru',{
|
||||
"Cut": "\u0412\u044b\u0440\u0435\u0437\u0430\u0442\u044c",
|
||||
"Heading 5": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 5",
|
||||
"Header 2": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 2",
|
||||
"Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "\u0412\u0430\u0448 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u044f\u043c\u043e\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0431\u0443\u0444\u0435\u0440\u0443 \u043e\u0431\u043c\u0435\u043d\u0430. \u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0432\u0438\u0448: Ctrl+X\/C\/V.",
|
||||
"Heading 4": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 4",
|
||||
"Div": "\u0411\u043b\u043e\u043a",
|
||||
"Heading 2": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 2",
|
||||
"Paste": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c",
|
||||
"Close": "\u0417\u0430\u043a\u0440\u044b\u0442\u044c",
|
||||
"Font Family": "\u0428\u0440\u0438\u0444\u0442",
|
||||
"Pre": "\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435",
|
||||
"Align right": "\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e",
|
||||
"New document": "\u041d\u043e\u0432\u044b\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442",
|
||||
"Blockquote": "\u0426\u0438\u0442\u0430\u0442\u0430",
|
||||
"Numbered list": "\u041d\u0443\u043c\u0435\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a",
|
||||
"Heading 1": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 1",
|
||||
"Headings": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438",
|
||||
"Increase indent": "\u0423\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u043e\u0442\u0441\u0442\u0443\u043f",
|
||||
"Formats": "\u0424\u043e\u0440\u043c\u0430\u0442",
|
||||
"Headers": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438",
|
||||
"Select all": "\u0412\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u0432\u0441\u0435",
|
||||
"Header 3": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 3",
|
||||
"Blocks": "\u0411\u043b\u043e\u043a\u0438",
|
||||
"Undo": "\u0412\u0435\u0440\u043d\u0443\u0442\u044c",
|
||||
"Strikethrough": "\u0417\u0430\u0447\u0435\u0440\u043a\u043d\u0443\u0442\u044b\u0439",
|
||||
"Bullet list": "\u041c\u0430\u0440\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a",
|
||||
"Header 1": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 1",
|
||||
"Superscript": "\u0412\u0435\u0440\u0445\u043d\u0438\u0439 \u0438\u043d\u0434\u0435\u043a\u0441",
|
||||
"Clear formatting": "\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442",
|
||||
"Font Sizes": "\u0420\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430",
|
||||
"Subscript": "\u041d\u0438\u0436\u043d\u0438\u0439 \u0438\u043d\u0434\u0435\u043a\u0441",
|
||||
"Header 6": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 6",
|
||||
"Redo": "\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c",
|
||||
"Paragraph": "\u041f\u0430\u0440\u0430\u0433\u0440\u0430\u0444",
|
||||
"Ok": "\u041e\u043a",
|
||||
"Bold": "\u041f\u043e\u043b\u0443\u0436\u0438\u0440\u043d\u044b\u0439",
|
||||
"Code": "\u041a\u043e\u0434",
|
||||
"Italic": "\u041a\u0443\u0440\u0441\u0438\u0432",
|
||||
"Align center": "\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443",
|
||||
"Header 5": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 5",
|
||||
"Heading 6": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 6",
|
||||
"Heading 3": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 3",
|
||||
"Decrease indent": "\u0423\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u043e\u0442\u0441\u0442\u0443\u043f",
|
||||
"Header 4": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 4",
|
||||
"Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.": "\u0412\u0441\u0442\u0430\u0432\u043a\u0430 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430, \u043f\u043e\u043a\u0430 \u043d\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u0443\u044e \u043e\u043f\u0446\u0438\u044e.",
|
||||
"Underline": "\u041f\u043e\u0434\u0447\u0435\u0440\u043a\u043d\u0443\u0442\u044b\u0439",
|
||||
"Cancel": "\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c",
|
||||
"Justify": "\u041f\u043e \u0448\u0438\u0440\u0438\u043d\u0435",
|
||||
"Inline": "\u0421\u0442\u0440\u043e\u0447\u043d\u044b\u0435",
|
||||
"Copy": "\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c",
|
||||
"Align left": "\u041f\u043e \u043b\u0435\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e",
|
||||
"Visual aids": "\u041f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0443\u0440\u044b",
|
||||
"Lower Greek": "\u0421\u0442\u0440\u043e\u0447\u043d\u044b\u0435 \u0433\u0440\u0435\u0447\u0435\u0441\u043a\u0438\u0435 \u0431\u0443\u043a\u0432\u044b",
|
||||
"Square": "\u041a\u0432\u0430\u0434\u0440\u0430\u0442\u044b",
|
||||
"Default": "\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439",
|
||||
"Lower Alpha": "\u0421\u0442\u0440\u043e\u0447\u043d\u044b\u0435 \u043b\u0430\u0442\u0438\u043d\u0441\u043a\u0438\u0435 \u0431\u0443\u043a\u0432\u044b",
|
||||
"Circle": "\u041e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u0438",
|
||||
"Disc": "\u041a\u0440\u0443\u0433\u0438",
|
||||
"Upper Alpha": "\u0417\u0430\u0433\u043b\u0430\u0432\u043d\u044b\u0435 \u043b\u0430\u0442\u0438\u043d\u0441\u043a\u0438\u0435 \u0431\u0443\u043a\u0432\u044b",
|
||||
"Upper Roman": "\u0417\u0430\u0433\u043b\u0430\u0432\u043d\u044b\u0435 \u0440\u0438\u043c\u0441\u043a\u0438\u0435 \u0446\u0438\u0444\u0440\u044b",
|
||||
"Lower Roman": "\u0421\u0442\u0440\u043e\u0447\u043d\u044b\u0435 \u0440\u0438\u043c\u0441\u043a\u0438\u0435 \u0446\u0438\u0444\u0440\u044b",
|
||||
"Name": "\u0418\u043c\u044f",
|
||||
"Anchor": "\u042f\u043a\u043e\u0440\u044c",
|
||||
"You have unsaved changes are you sure you want to navigate away?": "\u0423 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043d\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f. \u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0439\u0442\u0438?",
|
||||
"Restore last draft": "\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430",
|
||||
"Special character": "\u0421\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b",
|
||||
"Source code": "\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434",
|
||||
"B": "B",
|
||||
"R": "R",
|
||||
"G": "G",
|
||||
"Color": "\u0426\u0432\u0435\u0442",
|
||||
"Right to left": "\u041d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043f\u0440\u0430\u0432\u0430 \u043d\u0430\u043b\u0435\u0432\u043e",
|
||||
"Left to right": "\u041d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043b\u0435\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e",
|
||||
"Emoticons": "\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043c\u0430\u0439\u043b",
|
||||
"Robots": "\u0420\u043e\u0431\u043e\u0442\u044b",
|
||||
"Document properties": "\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430",
|
||||
"Title": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a",
|
||||
"Keywords": "\u041a\u043b\u044e\u0447\u0438\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430",
|
||||
"Encoding": "\u041a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0430",
|
||||
"Description": "\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435",
|
||||
"Author": "\u0410\u0432\u0442\u043e\u0440",
|
||||
"Fullscreen": "\u041f\u043e\u043b\u043d\u043e\u044d\u043a\u0440\u0430\u043d\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c",
|
||||
"Horizontal line": "\u0413\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u043b\u0438\u043d\u0438\u044f",
|
||||
"Horizontal space": "\u0413\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b",
|
||||
"Insert\/edit image": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c\/\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435",
|
||||
"General": "\u041e\u0431\u0449\u0435\u0435",
|
||||
"Advanced": "\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0435",
|
||||
"Source": "\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a",
|
||||
"Border": "\u0420\u0430\u043c\u043a\u0430",
|
||||
"Constrain proportions": "\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u0438",
|
||||
"Vertical space": "\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b",
|
||||
"Image description": "\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f",
|
||||
"Style": "\u0421\u0442\u0438\u043b\u044c",
|
||||
"Dimensions": "\u0420\u0430\u0437\u043c\u0435\u0440",
|
||||
"Insert image": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435",
|
||||
"Zoom in": "\u041f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u044c",
|
||||
"Contrast": "\u041a\u043e\u043d\u0442\u0440\u0430\u0441\u0442",
|
||||
"Back": "\u041d\u0430\u0437\u0430\u0434",
|
||||
"Gamma": "\u0413\u0430\u043c\u043c\u0430",
|
||||
"Flip horizontally": "\u041e\u0442\u0440\u0430\u0437\u0438\u0442\u044c \u043f\u043e \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u0438",
|
||||
"Resize": "\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440",
|
||||
"Sharpen": "\u0427\u0435\u0442\u043a\u043e\u0441\u0442\u044c",
|
||||
"Zoom out": "\u041e\u0442\u0434\u0430\u043b\u0438\u0442\u044c",
|
||||
"Image options": "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f",
|
||||
"Apply": "\u041f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c",
|
||||
"Brightness": "\u042f\u0440\u043a\u043e\u0441\u0442\u044c",
|
||||
"Rotate clockwise": "\u041f\u043e\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043f\u043e \u0447\u0430\u0441\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u0435\u043b\u043a\u0435",
|
||||
"Rotate counterclockwise": "\u041f\u043e\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043f\u0440\u043e\u0442\u0438\u0432 \u0447\u0430\u0441\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u0435\u043b\u043a\u0438",
|
||||
"Edit image": "\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435",
|
||||
"Color levels": "\u0426\u0432\u0435\u0442\u043e\u0432\u044b\u0435 \u0443\u0440\u043e\u0432\u043d\u0438",
|
||||
"Crop": "\u041e\u0431\u0440\u0435\u0437\u0430\u0442\u044c",
|
||||
"Orientation": "\u041e\u0440\u0438\u0435\u043d\u0442\u0430\u0446\u0438\u044f",
|
||||
"Flip vertically": "\u041e\u0442\u0440\u0430\u0437\u0438\u0442\u044c \u043f\u043e \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u0438",
|
||||
"Invert": "\u0418\u043d\u0432\u0435\u0440\u0441\u0438\u044f",
|
||||
"Insert date\/time": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0434\u0430\u0442\u0443\/\u0432\u0440\u0435\u043c\u044f",
|
||||
"Remove link": "\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443",
|
||||
"Url": "\u0410\u0434\u0440\u0435\u0441 \u0441\u0441\u044b\u043b\u043a\u0438",
|
||||
"Text to display": "\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0439 \u0442\u0435\u043a\u0441\u0442",
|
||||
"Anchors": "\u042f\u043a\u043e\u0440\u044f",
|
||||
"Insert link": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443",
|
||||
"New window": "\u0412 \u043d\u043e\u0432\u043e\u043c \u043e\u043a\u043d\u0435",
|
||||
"None": "\u041d\u0435\u0442",
|
||||
"The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "\u0412\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0439 URL \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u0441\u0441\u044b\u043b\u043a\u043e\u0439. \u0412\u044b \u0436\u0435\u043b\u0430\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u00abhttp:\/\/\u00bb?",
|
||||
"Target": "\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443",
|
||||
"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "\u0412\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0439 URL \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u043c \u0430\u0434\u0440\u0435\u0441\u043e\u043c \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0439 \u043f\u043e\u0447\u0442\u044b. \u0412\u044b \u0436\u0435\u043b\u0430\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u00abmailto:\u00bb?",
|
||||
"Insert\/edit link": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c\/\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443",
|
||||
"Insert\/edit video": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c\/\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0438\u0434\u0435\u043e",
|
||||
"Poster": "\u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435",
|
||||
"Alternative source": "\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a",
|
||||
"Paste your embed code below:": "\u0412\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0432\u0430\u0448 \u043a\u043e\u0434 \u043d\u0438\u0436\u0435:",
|
||||
"Insert video": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432\u0438\u0434\u0435\u043e",
|
||||
"Embed": "\u041a\u043e\u0434 \u0434\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438",
|
||||
"Nonbreaking space": "\u041d\u0435\u0440\u0430\u0437\u0440\u044b\u0432\u043d\u044b\u0439 \u043f\u0440\u043e\u0431\u0435\u043b",
|
||||
"Page break": "\u0420\u0430\u0437\u0440\u044b\u0432 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b",
|
||||
"Paste as text": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043a \u0442\u0435\u043a\u0441\u0442",
|
||||
"Preview": "\u041f\u0440\u0435\u0434\u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440",
|
||||
"Print": "\u041f\u0435\u0447\u0430\u0442\u044c",
|
||||
"Save": "\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c",
|
||||
"Could not find the specified string.": "\u0417\u0430\u0434\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u0430",
|
||||
"Replace": "\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c",
|
||||
"Next": "\u0412\u043d\u0438\u0437",
|
||||
"Whole words": "\u0421\u043b\u043e\u0432\u043e \u0446\u0435\u043b\u0438\u043a\u043e\u043c",
|
||||
"Find and replace": "\u041f\u043e\u0438\u0441\u043a \u0438 \u0437\u0430\u043c\u0435\u043d\u0430",
|
||||
"Replace with": "\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430",
|
||||
"Find": "\u041d\u0430\u0439\u0442\u0438",
|
||||
"Replace all": "\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0441\u0435",
|
||||
"Match case": "\u0423\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0440\u0435\u0433\u0438\u0441\u0442\u0440",
|
||||
"Prev": "\u0412\u0432\u0435\u0440\u0445",
|
||||
"Spellcheck": "\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435",
|
||||
"Finish": "\u0417\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u044c",
|
||||
"Ignore all": "\u0418\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435",
|
||||
"Ignore": "\u0418\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c",
|
||||
"Add to Dictionary": "\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u044c",
|
||||
"Insert row before": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u0443\u0441\u0442\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0441\u0432\u0435\u0440\u0445\u0443",
|
||||
"Rows": "\u0421\u0442\u0440\u043e\u043a\u0438",
|
||||
"Height": "\u0412\u044b\u0441\u043e\u0442\u0430",
|
||||
"Paste row after": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 \u0441\u043d\u0438\u0437\u0443",
|
||||
"Alignment": "\u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435",
|
||||
"Border color": "\u0426\u0432\u0435\u0442 \u0440\u0430\u043c\u043a\u0438",
|
||||
"Column group": "\u0413\u0440\u0443\u043f\u043f\u0430 \u043a\u043e\u043b\u043e\u043d\u043e\u043a",
|
||||
"Row": "\u0421\u0442\u0440\u043e\u043a\u0430",
|
||||
"Insert column before": "\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u0441\u043b\u0435\u0432\u0430",
|
||||
"Split cell": "\u0420\u0430\u0437\u0431\u0438\u0442\u044c \u044f\u0447\u0435\u0439\u043a\u0443",
|
||||
"Cell padding": "\u0412\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u043e\u0442\u0441\u0442\u0443\u043f",
|
||||
"Cell spacing": "\u0412\u043d\u0435\u0448\u043d\u0438\u0439 \u043e\u0442\u0441\u0442\u0443\u043f",
|
||||
"Row type": "\u0422\u0438\u043f \u0441\u0442\u0440\u043e\u043a\u0438",
|
||||
"Insert table": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0443",
|
||||
"Body": "\u0422\u0435\u043b\u043e",
|
||||
"Caption": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a",
|
||||
"Footer": "\u041d\u0438\u0437",
|
||||
"Delete row": "\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443",
|
||||
"Paste row before": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 \u0441\u0432\u0435\u0440\u0445\u0443",
|
||||
"Scope": "Scope",
|
||||
"Delete table": "\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0443",
|
||||
"H Align": "\u0413\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435",
|
||||
"Top": "\u041f\u043e \u0432\u0435\u0440\u0445\u0443",
|
||||
"Header cell": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a",
|
||||
"Column": "\u0421\u0442\u043e\u043b\u0431\u0435\u0446",
|
||||
"Row group": "\u0413\u0440\u0443\u043f\u043f\u0430 \u0441\u0442\u0440\u043e\u043a",
|
||||
"Cell": "\u042f\u0447\u0435\u0439\u043a\u0430",
|
||||
"Middle": "\u041f\u043e \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0435",
|
||||
"Cell type": "\u0422\u0438\u043f \u044f\u0447\u0435\u0439\u043a\u0438",
|
||||
"Copy row": "\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443",
|
||||
"Row properties": "\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0442\u0440\u043e\u043a\u0438",
|
||||
"Table properties": "\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u044b",
|
||||
"Bottom": "\u041f\u043e \u043d\u0438\u0437\u0443",
|
||||
"V Align": "\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435",
|
||||
"Header": "\u0428\u0430\u043f\u043a\u0430",
|
||||
"Right": "\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e",
|
||||
"Insert column after": "\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u0441\u043f\u0440\u0430\u0432\u0430",
|
||||
"Cols": "\u0421\u0442\u043e\u043b\u0431\u0446\u044b",
|
||||
"Insert row after": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u0443\u0441\u0442\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0441\u043d\u0438\u0437\u0443",
|
||||
"Width": "\u0428\u0438\u0440\u0438\u043d\u0430",
|
||||
"Cell properties": "\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u044f\u0447\u0435\u0439\u043a\u0438",
|
||||
"Left": "\u041f\u043e \u043b\u0435\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e",
|
||||
"Cut row": "\u0412\u044b\u0440\u0435\u0437\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443",
|
||||
"Delete column": "\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u0442\u043e\u043b\u0431\u0435\u0446",
|
||||
"Center": "\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443",
|
||||
"Merge cells": "\u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u044f\u0447\u0435\u0439\u043a\u0438",
|
||||
"Insert template": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d",
|
||||
"Templates": "\u0428\u0430\u0431\u043b\u043e\u043d\u044b",
|
||||
"Background color": "\u0426\u0432\u0435\u0442 \u0444\u043e\u043d\u0430",
|
||||
"Custom...": "\u0412\u044b\u0431\u0440\u0430\u0442\u044c\u2026",
|
||||
"Custom color": "\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0446\u0432\u0435\u0442",
|
||||
"No color": "\u0411\u0435\u0437 \u0446\u0432\u0435\u0442\u0430",
|
||||
"Text color": "\u0426\u0432\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u0430",
|
||||
"Show blocks": "\u041f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0431\u043b\u043e\u043a\u0438",
|
||||
"Show invisible characters": "\u041f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0435\u0432\u0438\u0434\u0438\u043c\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b",
|
||||
"Words: {0}": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u043e\u0432: {0}",
|
||||
"Insert": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c",
|
||||
"File": "\u0424\u0430\u0439\u043b",
|
||||
"Edit": "\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c",
|
||||
"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "\u0422\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435. \u041d\u0430\u0436\u043c\u0438\u0442\u0435 ALT-F9 \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043c\u0435\u043d\u044e, ALT-F10 \u043f\u0430\u043d\u0435\u043b\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, ALT-0 \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u043f\u043e\u043c\u043e\u0449\u0438.",
|
||||
"Tools": "\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b",
|
||||
"View": "\u0412\u0438\u0434",
|
||||
"Table": "\u0422\u0430\u0431\u043b\u0438\u0446\u0430",
|
||||
"Format": "\u0424\u043e\u0440\u043c\u0430\u0442"
|
||||
});
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,7 @@
|
||||
// Exports the "advlist" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/advlist')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/advlist'
|
||||
require('./plugin.js');
|
||||
@@ -1,97 +1,160 @@
|
||||
/**
|
||||
* plugin.js
|
||||
*
|
||||
* Copyright, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
(function () {
|
||||
var advlist = (function () {
|
||||
'use strict';
|
||||
|
||||
/*global tinymce:true */
|
||||
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
||||
|
||||
tinymce.PluginManager.add('advlist', function(editor) {
|
||||
var olMenuItems, ulMenuItems, lastStyles = {};
|
||||
var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
||||
|
||||
function buildMenuItems(listName, styleValues) {
|
||||
var items = [];
|
||||
var applyListFormat = function (editor, listName, styleValue) {
|
||||
var cmd = listName === 'UL' ? 'InsertUnorderedList' : 'InsertOrderedList';
|
||||
editor.execCommand(cmd, false, styleValue === false ? null : { 'list-style-type': styleValue });
|
||||
};
|
||||
var $_fdwamj82jh8lpuc2 = { applyListFormat: applyListFormat };
|
||||
|
||||
tinymce.each(styleValues.split(/[ ,]/), function(styleValue) {
|
||||
items.push({
|
||||
text: styleValue.replace(/\-/g, ' ').replace(/\b\w/g, function(chr) {
|
||||
return chr.toUpperCase();
|
||||
}),
|
||||
data: styleValue == 'default' ? '' : styleValue
|
||||
});
|
||||
});
|
||||
var register = function (editor) {
|
||||
editor.addCommand('ApplyUnorderedListStyle', function (ui, value) {
|
||||
$_fdwamj82jh8lpuc2.applyListFormat(editor, 'UL', value['list-style-type']);
|
||||
});
|
||||
editor.addCommand('ApplyOrderedListStyle', function (ui, value) {
|
||||
$_fdwamj82jh8lpuc2.applyListFormat(editor, 'OL', value['list-style-type']);
|
||||
});
|
||||
};
|
||||
var $_1rj6rj81jh8lpuc0 = { register: register };
|
||||
|
||||
return items;
|
||||
}
|
||||
var getNumberStyles = function (editor) {
|
||||
var styles = editor.getParam('advlist_number_styles', 'default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman');
|
||||
return styles ? styles.split(/[ ,]/) : [];
|
||||
};
|
||||
var getBulletStyles = function (editor) {
|
||||
var styles = editor.getParam('advlist_bullet_styles', 'default,circle,disc,square');
|
||||
return styles ? styles.split(/[ ,]/) : [];
|
||||
};
|
||||
var $_1c19wf84jh8lpuc8 = {
|
||||
getNumberStyles: getNumberStyles,
|
||||
getBulletStyles: getBulletStyles
|
||||
};
|
||||
|
||||
olMenuItems = buildMenuItems('OL', editor.getParam(
|
||||
"advlist_number_styles",
|
||||
"default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman"
|
||||
));
|
||||
var isChildOfBody = function (editor, elm) {
|
||||
return editor.$.contains(editor.getBody(), elm);
|
||||
};
|
||||
var isTableCellNode = function (node) {
|
||||
return node && /^(TH|TD)$/.test(node.nodeName);
|
||||
};
|
||||
var isListNode = function (editor) {
|
||||
return function (node) {
|
||||
return node && /^(OL|UL|DL)$/.test(node.nodeName) && isChildOfBody(editor, node);
|
||||
};
|
||||
};
|
||||
var getSelectedStyleType = function (editor) {
|
||||
var listElm = editor.dom.getParent(editor.selection.getNode(), 'ol,ul');
|
||||
return editor.dom.getStyle(listElm, 'listStyleType') || '';
|
||||
};
|
||||
var $_1dfrak85jh8lpuc9 = {
|
||||
isTableCellNode: isTableCellNode,
|
||||
isListNode: isListNode,
|
||||
getSelectedStyleType: getSelectedStyleType
|
||||
};
|
||||
|
||||
ulMenuItems = buildMenuItems('UL', editor.getParam("advlist_bullet_styles", "default,circle,disc,square"));
|
||||
var styleValueToText = function (styleValue) {
|
||||
return styleValue.replace(/\-/g, ' ').replace(/\b\w/g, function (chr) {
|
||||
return chr.toUpperCase();
|
||||
});
|
||||
};
|
||||
var toMenuItems = function (styles) {
|
||||
return global$1.map(styles, function (styleValue) {
|
||||
var text = styleValueToText(styleValue);
|
||||
var data = styleValue === 'default' ? '' : styleValue;
|
||||
return {
|
||||
text: text,
|
||||
data: data
|
||||
};
|
||||
});
|
||||
};
|
||||
var $_et29hm86jh8lpucb = { toMenuItems: toMenuItems };
|
||||
|
||||
function applyListFormat(listName, styleValue) {
|
||||
editor.undoManager.transact(function() {
|
||||
var list, dom = editor.dom, sel = editor.selection;
|
||||
var findIndex = function (list, predicate) {
|
||||
for (var index = 0; index < list.length; index++) {
|
||||
var element = list[index];
|
||||
if (predicate(element)) {
|
||||
return index;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
var listState = function (editor, listName) {
|
||||
return function (e) {
|
||||
var ctrl = e.control;
|
||||
editor.on('NodeChange', function (e) {
|
||||
var tableCellIndex = findIndex(e.parents, $_1dfrak85jh8lpuc9.isTableCellNode);
|
||||
var parents = tableCellIndex !== -1 ? e.parents.slice(0, tableCellIndex) : e.parents;
|
||||
var lists = global$1.grep(parents, $_1dfrak85jh8lpuc9.isListNode(editor));
|
||||
ctrl.active(lists.length > 0 && lists[0].nodeName === listName);
|
||||
});
|
||||
};
|
||||
};
|
||||
var updateSelection = function (editor) {
|
||||
return function (e) {
|
||||
var listStyleType = $_1dfrak85jh8lpuc9.getSelectedStyleType(editor);
|
||||
e.control.items().each(function (ctrl) {
|
||||
ctrl.active(ctrl.settings.data === listStyleType);
|
||||
});
|
||||
};
|
||||
};
|
||||
var addSplitButton = function (editor, id, tooltip, cmd, nodeName, styles) {
|
||||
editor.addButton(id, {
|
||||
active: false,
|
||||
type: 'splitbutton',
|
||||
tooltip: tooltip,
|
||||
menu: $_et29hm86jh8lpucb.toMenuItems(styles),
|
||||
onPostRender: listState(editor, nodeName),
|
||||
onshow: updateSelection(editor),
|
||||
onselect: function (e) {
|
||||
$_fdwamj82jh8lpuc2.applyListFormat(editor, nodeName, e.control.settings.data);
|
||||
},
|
||||
onclick: function () {
|
||||
editor.execCommand(cmd);
|
||||
}
|
||||
});
|
||||
};
|
||||
var addButton = function (editor, id, tooltip, cmd, nodeName, styles) {
|
||||
editor.addButton(id, {
|
||||
active: false,
|
||||
type: 'button',
|
||||
tooltip: tooltip,
|
||||
onPostRender: listState(editor, nodeName),
|
||||
onclick: function () {
|
||||
editor.execCommand(cmd);
|
||||
}
|
||||
});
|
||||
};
|
||||
var addControl = function (editor, id, tooltip, cmd, nodeName, styles) {
|
||||
if (styles.length > 0) {
|
||||
addSplitButton(editor, id, tooltip, cmd, nodeName, styles);
|
||||
} else {
|
||||
addButton(editor, id, tooltip, cmd, nodeName, styles);
|
||||
}
|
||||
};
|
||||
var register$1 = function (editor) {
|
||||
addControl(editor, 'numlist', 'Numbered list', 'InsertOrderedList', 'OL', $_1c19wf84jh8lpuc8.getNumberStyles(editor));
|
||||
addControl(editor, 'bullist', 'Bullet list', 'InsertUnorderedList', 'UL', $_1c19wf84jh8lpuc8.getBulletStyles(editor));
|
||||
};
|
||||
var $_4t8tbw83jh8lpuc4 = { register: register$1 };
|
||||
|
||||
// Check for existing list element
|
||||
list = dom.getParent(sel.getNode(), 'ol,ul');
|
||||
global.add('advlist', function (editor) {
|
||||
var hasPlugin = function (editor, plugin) {
|
||||
var plugins = editor.settings.plugins ? editor.settings.plugins : '';
|
||||
return global$1.inArray(plugins.split(/[ ,]/), plugin) !== -1;
|
||||
};
|
||||
if (hasPlugin(editor, 'lists')) {
|
||||
$_4t8tbw83jh8lpuc4.register(editor);
|
||||
$_1rj6rj81jh8lpuc0.register(editor);
|
||||
}
|
||||
});
|
||||
function Plugin () {
|
||||
}
|
||||
|
||||
// Switch/add list type if needed
|
||||
if (!list || list.nodeName != listName || styleValue === false) {
|
||||
editor.execCommand(listName == 'UL' ? 'InsertUnorderedList' : 'InsertOrderedList');
|
||||
}
|
||||
return Plugin;
|
||||
|
||||
// Set style
|
||||
styleValue = styleValue === false ? lastStyles[listName] : styleValue;
|
||||
lastStyles[listName] = styleValue;
|
||||
|
||||
list = dom.getParent(sel.getNode(), 'ol,ul');
|
||||
if (list) {
|
||||
dom.setStyle(list, 'listStyleType', styleValue ? styleValue : null);
|
||||
list.removeAttribute('data-mce-style');
|
||||
}
|
||||
|
||||
editor.focus();
|
||||
});
|
||||
}
|
||||
|
||||
function updateSelection(e) {
|
||||
var listStyleType = editor.dom.getStyle(editor.dom.getParent(editor.selection.getNode(), 'ol,ul'), 'listStyleType') || '';
|
||||
|
||||
e.control.items().each(function(ctrl) {
|
||||
ctrl.active(ctrl.settings.data === listStyleType);
|
||||
});
|
||||
}
|
||||
|
||||
editor.addButton('numlist', {
|
||||
type: 'splitbutton',
|
||||
tooltip: 'Numbered list',
|
||||
menu: olMenuItems,
|
||||
onshow: updateSelection,
|
||||
onselect: function(e) {
|
||||
applyListFormat('OL', e.control.settings.data);
|
||||
},
|
||||
onclick: function() {
|
||||
applyListFormat('OL', false);
|
||||
}
|
||||
});
|
||||
|
||||
editor.addButton('bullist', {
|
||||
type: 'splitbutton',
|
||||
tooltip: 'Bullet list',
|
||||
menu: ulMenuItems,
|
||||
onshow: updateSelection,
|
||||
onselect: function(e) {
|
||||
applyListFormat('UL', e.control.settings.data);
|
||||
},
|
||||
onclick: function() {
|
||||
applyListFormat('UL', false);
|
||||
}
|
||||
});
|
||||
});
|
||||
}());
|
||||
})();
|
||||
|
||||
@@ -1 +1 @@
|
||||
tinymce.PluginManager.add("advlist",function(a){function b(a,b){var c=[];return tinymce.each(b.split(/[ ,]/),function(a){c.push({text:a.replace(/\-/g," ").replace(/\b\w/g,function(a){return a.toUpperCase()}),data:"default"==a?"":a})}),c}function c(b,c){a.undoManager.transact(function(){var d,e=a.dom,f=a.selection;d=e.getParent(f.getNode(),"ol,ul"),d&&d.nodeName==b&&c!==!1||a.execCommand("UL"==b?"InsertUnorderedList":"InsertOrderedList"),c=c===!1?g[b]:c,g[b]=c,d=e.getParent(f.getNode(),"ol,ul"),d&&(e.setStyle(d,"listStyleType",c?c:null),d.removeAttribute("data-mce-style")),a.focus()})}function d(b){var c=a.dom.getStyle(a.dom.getParent(a.selection.getNode(),"ol,ul"),"listStyleType")||"";b.control.items().each(function(a){a.active(a.settings.data===c)})}var e,f,g={};e=b("OL",a.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman")),f=b("UL",a.getParam("advlist_bullet_styles","default,circle,disc,square")),a.addButton("numlist",{type:"splitbutton",tooltip:"Numbered list",menu:e,onshow:d,onselect:function(a){c("OL",a.control.settings.data)},onclick:function(){c("OL",!1)}}),a.addButton("bullist",{type:"splitbutton",tooltip:"Bullet list",menu:f,onshow:d,onselect:function(a){c("UL",a.control.settings.data)},onclick:function(){c("UL",!1)}})});
|
||||
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=tinymce.util.Tools.resolve("tinymce.util.Tools"),s=function(t,e,n){var r="UL"===e?"InsertUnorderedList":"InsertOrderedList";t.execCommand(r,!1,!1===n?null:{"list-style-type":n})},o=function(n){n.addCommand("ApplyUnorderedListStyle",function(t,e){s(n,"UL",e["list-style-type"])}),n.addCommand("ApplyOrderedListStyle",function(t,e){s(n,"OL",e["list-style-type"])})},e=function(t){var e=t.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");return e?e.split(/[ ,]/):[]},n=function(t){var e=t.getParam("advlist_bullet_styles","default,circle,disc,square");return e?e.split(/[ ,]/):[]},u=function(t){return t&&/^(TH|TD)$/.test(t.nodeName)},c=function(r){return function(t){return t&&/^(OL|UL|DL)$/.test(t.nodeName)&&(n=t,(e=r).$.contains(e.getBody(),n));var e,n}},d=function(t){var e=t.dom.getParent(t.selection.getNode(),"ol,ul");return t.dom.getStyle(e,"listStyleType")||""},p=function(t){return a.map(t,function(t){return{text:t.replace(/\-/g," ").replace(/\b\w/g,function(t){return t.toUpperCase()}),data:"default"===t?"":t}})},f=function(i,l){return function(t){var o=t.control;i.on("NodeChange",function(t){var e=function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n;return-1}(t.parents,u),n=-1!==e?t.parents.slice(0,e):t.parents,r=a.grep(n,c(i));o.active(0<r.length&&r[0].nodeName===l)})}},m=function(e,t,n,r,o,i){var l;e.addButton(t,{active:!1,type:"splitbutton",tooltip:n,menu:p(i),onPostRender:f(e,o),onshow:(l=e,function(t){var e=d(l);t.control.items().each(function(t){t.active(t.settings.data===e)})}),onselect:function(t){s(e,o,t.control.settings.data)},onclick:function(){e.execCommand(r)}})},r=function(t,e,n,r,o,i){var l,a,s,u,c;0<i.length?m(t,e,n,r,o,i):(a=e,s=n,u=r,c=o,(l=t).addButton(a,{active:!1,type:"button",tooltip:s,onPostRender:f(l,c),onclick:function(){l.execCommand(u)}}))},i=function(t){r(t,"numlist","Numbered list","InsertOrderedList","OL",e(t)),r(t,"bullist","Bullet list","InsertUnorderedList","UL",n(t))};t.add("advlist",function(t){var e,n,r;n="lists",r=(e=t).settings.plugins?e.settings.plugins:"",-1!==a.inArray(r.split(/[ ,]/),n)&&(i(t),o(t))})}();
|
||||
@@ -0,0 +1,7 @@
|
||||
// Exports the "anchor" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/anchor')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/anchor'
|
||||
require('./plugin.js');
|
||||
@@ -1,45 +1,118 @@
|
||||
/**
|
||||
* plugin.js
|
||||
*
|
||||
* Copyright, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
(function () {
|
||||
var anchor = (function () {
|
||||
'use strict';
|
||||
|
||||
/*global tinymce:true */
|
||||
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
||||
|
||||
tinymce.PluginManager.add('anchor', function(editor) {
|
||||
function showDialog() {
|
||||
var selectedNode = editor.selection.getNode(), name = '';
|
||||
var isValidId = function (id) {
|
||||
return /^[A-Za-z][A-Za-z0-9\-:._]*$/.test(id);
|
||||
};
|
||||
var getId = function (editor) {
|
||||
var selectedNode = editor.selection.getNode();
|
||||
var isAnchor = selectedNode.tagName === 'A' && editor.dom.getAttrib(selectedNode, 'href') === '';
|
||||
return isAnchor ? selectedNode.id || selectedNode.name : '';
|
||||
};
|
||||
var insert = function (editor, id) {
|
||||
var selectedNode = editor.selection.getNode();
|
||||
var isAnchor = selectedNode.tagName === 'A' && editor.dom.getAttrib(selectedNode, 'href') === '';
|
||||
if (isAnchor) {
|
||||
selectedNode.removeAttribute('name');
|
||||
selectedNode.id = id;
|
||||
editor.undoManager.add();
|
||||
} else {
|
||||
editor.focus();
|
||||
editor.selection.collapse(true);
|
||||
editor.execCommand('mceInsertContent', false, editor.dom.createHTML('a', { id: id }));
|
||||
}
|
||||
};
|
||||
var $_8muarh8bjh8lpucu = {
|
||||
isValidId: isValidId,
|
||||
getId: getId,
|
||||
insert: insert
|
||||
};
|
||||
|
||||
if (selectedNode.tagName == 'A') {
|
||||
name = selectedNode.name || selectedNode.id || '';
|
||||
}
|
||||
var insertAnchor = function (editor, newId) {
|
||||
if (!$_8muarh8bjh8lpucu.isValidId(newId)) {
|
||||
editor.windowManager.alert('Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.');
|
||||
return true;
|
||||
} else {
|
||||
$_8muarh8bjh8lpucu.insert(editor, newId);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
var open = function (editor) {
|
||||
var currentId = $_8muarh8bjh8lpucu.getId(editor);
|
||||
editor.windowManager.open({
|
||||
title: 'Anchor',
|
||||
body: {
|
||||
type: 'textbox',
|
||||
name: 'id',
|
||||
size: 40,
|
||||
label: 'Id',
|
||||
value: currentId
|
||||
},
|
||||
onsubmit: function (e) {
|
||||
var newId = e.data.id;
|
||||
if (insertAnchor(editor, newId)) {
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
var $_ghc7qg8ajh8lpucs = { open: open };
|
||||
|
||||
editor.windowManager.open({
|
||||
title: 'Anchor',
|
||||
body: {type: 'textbox', name: 'name', size: 40, label: 'Name', value: name},
|
||||
onsubmit: function(e) {
|
||||
editor.execCommand('mceInsertContent', false, editor.dom.createHTML('a', {
|
||||
id: e.data.name
|
||||
}));
|
||||
}
|
||||
});
|
||||
}
|
||||
var register = function (editor) {
|
||||
editor.addCommand('mceAnchor', function () {
|
||||
$_ghc7qg8ajh8lpucs.open(editor);
|
||||
});
|
||||
};
|
||||
var $_60epor89jh8lpucr = { register: register };
|
||||
|
||||
editor.addButton('anchor', {
|
||||
icon: 'anchor',
|
||||
tooltip: 'Anchor',
|
||||
onclick: showDialog,
|
||||
stateSelector: 'a:not([href])'
|
||||
});
|
||||
var isAnchorNode = function (node) {
|
||||
return !node.attr('href') && (node.attr('id') || node.attr('name')) && !node.firstChild;
|
||||
};
|
||||
var setContentEditable = function (state) {
|
||||
return function (nodes) {
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
if (isAnchorNode(nodes[i])) {
|
||||
nodes[i].attr('contenteditable', state);
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
var setup = function (editor) {
|
||||
editor.on('PreInit', function () {
|
||||
editor.parser.addNodeFilter('a', setContentEditable('false'));
|
||||
editor.serializer.addNodeFilter('a', setContentEditable(null));
|
||||
});
|
||||
};
|
||||
var $_etc1gj8cjh8lpucv = { setup: setup };
|
||||
|
||||
editor.addMenuItem('anchor', {
|
||||
icon: 'anchor',
|
||||
text: 'Anchor',
|
||||
context: 'insert',
|
||||
onclick: showDialog
|
||||
});
|
||||
});
|
||||
var register$1 = function (editor) {
|
||||
editor.addButton('anchor', {
|
||||
icon: 'anchor',
|
||||
tooltip: 'Anchor',
|
||||
cmd: 'mceAnchor',
|
||||
stateSelector: 'a:not([href])'
|
||||
});
|
||||
editor.addMenuItem('anchor', {
|
||||
icon: 'anchor',
|
||||
text: 'Anchor',
|
||||
context: 'insert',
|
||||
cmd: 'mceAnchor'
|
||||
});
|
||||
};
|
||||
var $_6ikf18djh8lpucw = { register: register$1 };
|
||||
|
||||
global.add('anchor', function (editor) {
|
||||
$_etc1gj8cjh8lpucv.setup(editor);
|
||||
$_60epor89jh8lpucr.register(editor);
|
||||
$_6ikf18djh8lpucw.register(editor);
|
||||
});
|
||||
function Plugin () {
|
||||
}
|
||||
|
||||
return Plugin;
|
||||
|
||||
}());
|
||||
})();
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
tinymce.PluginManager.add("anchor",function(a){function b(){var b=a.selection.getNode(),c="";"A"==b.tagName&&(c=b.name||b.id||""),a.windowManager.open({title:"Anchor",body:{type:"textbox",name:"name",size:40,label:"Name",value:c},onsubmit:function(b){a.execCommand("mceInsertContent",!1,a.dom.createHTML("a",{id:b.data.name}))}})}a.addButton("anchor",{icon:"anchor",tooltip:"Anchor",onclick:b,stateSelector:"a:not([href])"}),a.addMenuItem("anchor",{icon:"anchor",text:"Anchor",context:"insert",onclick:b})});
|
||||
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=function(t){return/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(t)},e=function(t){var e=t.selection.getNode();return"A"===e.tagName&&""===t.dom.getAttrib(e,"href")?e.id||e.name:""},i=function(t,e){var n=t.selection.getNode();"A"===n.tagName&&""===t.dom.getAttrib(n,"href")?(n.removeAttribute("name"),n.id=e,t.undoManager.add()):(t.focus(),t.selection.collapse(!0),t.execCommand("mceInsertContent",!1,t.dom.createHTML("a",{id:e})))},n=function(r){var t=e(r);r.windowManager.open({title:"Anchor",body:{type:"textbox",name:"id",size:40,label:"Id",value:t},onsubmit:function(t){var e,n,o=t.data.id;e=r,(a(n=o)?(i(e,n),0):(e.windowManager.alert("Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."),1))&&t.preventDefault()}})},o=function(t){t.addCommand("mceAnchor",function(){n(t)})},r=function(o){return function(t){for(var e=0;e<t.length;e++)(n=t[e]).attr("href")||!n.attr("id")&&!n.attr("name")||n.firstChild||t[e].attr("contenteditable",o);var n}},c=function(t){t.on("PreInit",function(){t.parser.addNodeFilter("a",r("false")),t.serializer.addNodeFilter("a",r(null))})},d=function(t){t.addButton("anchor",{icon:"anchor",tooltip:"Anchor",cmd:"mceAnchor",stateSelector:"a:not([href])"}),t.addMenuItem("anchor",{icon:"anchor",text:"Anchor",context:"insert",cmd:"mceAnchor"})};t.add("anchor",function(t){c(t),o(t),d(t)})}();
|
||||
@@ -0,0 +1,7 @@
|
||||
// Exports the "autolink" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/autolink')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/autolink'
|
||||
require('./plugin.js');
|
||||
@@ -1,194 +1,180 @@
|
||||
/**
|
||||
* plugin.js
|
||||
*
|
||||
* Copyright 2011, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
(function () {
|
||||
var autolink = (function () {
|
||||
'use strict';
|
||||
|
||||
/*global tinymce:true */
|
||||
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
||||
|
||||
tinymce.PluginManager.add('autolink', function(editor) {
|
||||
var AutoUrlDetectState;
|
||||
var global$1 = tinymce.util.Tools.resolve('tinymce.Env');
|
||||
|
||||
editor.on("keydown", function(e) {
|
||||
if (e.keyCode == 13) {
|
||||
return handleEnter(editor);
|
||||
}
|
||||
});
|
||||
var getAutoLinkPattern = function (editor) {
|
||||
return editor.getParam('autolink_pattern', /^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i);
|
||||
};
|
||||
var getDefaultLinkTarget = function (editor) {
|
||||
return editor.getParam('default_link_target', '');
|
||||
};
|
||||
var $_4bcsa48ijh8lpudd = {
|
||||
getAutoLinkPattern: getAutoLinkPattern,
|
||||
getDefaultLinkTarget: getDefaultLinkTarget
|
||||
};
|
||||
|
||||
// Internet Explorer has built-in automatic linking for most cases
|
||||
if (tinymce.Env.ie) {
|
||||
editor.on("focus", function() {
|
||||
if (!AutoUrlDetectState) {
|
||||
AutoUrlDetectState = true;
|
||||
var rangeEqualsDelimiterOrSpace = function (rangeString, delimiter) {
|
||||
return rangeString === delimiter || rangeString === ' ' || rangeString.charCodeAt(0) === 160;
|
||||
};
|
||||
var handleEclipse = function (editor) {
|
||||
parseCurrentLine(editor, -1, '(');
|
||||
};
|
||||
var handleSpacebar = function (editor) {
|
||||
parseCurrentLine(editor, 0, '');
|
||||
};
|
||||
var handleEnter = function (editor) {
|
||||
parseCurrentLine(editor, -1, '');
|
||||
};
|
||||
var scopeIndex = function (container, index) {
|
||||
if (index < 0) {
|
||||
index = 0;
|
||||
}
|
||||
if (container.nodeType === 3) {
|
||||
var len = container.data.length;
|
||||
if (index > len) {
|
||||
index = len;
|
||||
}
|
||||
}
|
||||
return index;
|
||||
};
|
||||
var setStart = function (rng, container, offset) {
|
||||
if (container.nodeType !== 1 || container.hasChildNodes()) {
|
||||
rng.setStart(container, scopeIndex(container, offset));
|
||||
} else {
|
||||
rng.setStartBefore(container);
|
||||
}
|
||||
};
|
||||
var setEnd = function (rng, container, offset) {
|
||||
if (container.nodeType !== 1 || container.hasChildNodes()) {
|
||||
rng.setEnd(container, scopeIndex(container, offset));
|
||||
} else {
|
||||
rng.setEndAfter(container);
|
||||
}
|
||||
};
|
||||
var parseCurrentLine = function (editor, endOffset, delimiter) {
|
||||
var rng, end, start, endContainer, bookmark, text, matches, prev, len, rngText;
|
||||
var autoLinkPattern = $_4bcsa48ijh8lpudd.getAutoLinkPattern(editor);
|
||||
var defaultLinkTarget = $_4bcsa48ijh8lpudd.getDefaultLinkTarget(editor);
|
||||
if (editor.selection.getNode().tagName === 'A') {
|
||||
return;
|
||||
}
|
||||
rng = editor.selection.getRng(true).cloneRange();
|
||||
if (rng.startOffset < 5) {
|
||||
prev = rng.endContainer.previousSibling;
|
||||
if (!prev) {
|
||||
if (!rng.endContainer.firstChild || !rng.endContainer.firstChild.nextSibling) {
|
||||
return;
|
||||
}
|
||||
prev = rng.endContainer.firstChild.nextSibling;
|
||||
}
|
||||
len = prev.length;
|
||||
setStart(rng, prev, len);
|
||||
setEnd(rng, prev, len);
|
||||
if (rng.endOffset < 5) {
|
||||
return;
|
||||
}
|
||||
end = rng.endOffset;
|
||||
endContainer = prev;
|
||||
} else {
|
||||
endContainer = rng.endContainer;
|
||||
if (endContainer.nodeType !== 3 && endContainer.firstChild) {
|
||||
while (endContainer.nodeType !== 3 && endContainer.firstChild) {
|
||||
endContainer = endContainer.firstChild;
|
||||
}
|
||||
if (endContainer.nodeType === 3) {
|
||||
setStart(rng, endContainer, 0);
|
||||
setEnd(rng, endContainer, endContainer.nodeValue.length);
|
||||
}
|
||||
}
|
||||
if (rng.endOffset === 1) {
|
||||
end = 2;
|
||||
} else {
|
||||
end = rng.endOffset - 1 - endOffset;
|
||||
}
|
||||
}
|
||||
start = end;
|
||||
do {
|
||||
setStart(rng, endContainer, end >= 2 ? end - 2 : 0);
|
||||
setEnd(rng, endContainer, end >= 1 ? end - 1 : 0);
|
||||
end -= 1;
|
||||
rngText = rng.toString();
|
||||
} while (rngText !== ' ' && rngText !== '' && rngText.charCodeAt(0) !== 160 && end - 2 >= 0 && rngText !== delimiter);
|
||||
if (rangeEqualsDelimiterOrSpace(rng.toString(), delimiter)) {
|
||||
setStart(rng, endContainer, end);
|
||||
setEnd(rng, endContainer, start);
|
||||
end += 1;
|
||||
} else if (rng.startOffset === 0) {
|
||||
setStart(rng, endContainer, 0);
|
||||
setEnd(rng, endContainer, start);
|
||||
} else {
|
||||
setStart(rng, endContainer, end);
|
||||
setEnd(rng, endContainer, start);
|
||||
}
|
||||
text = rng.toString();
|
||||
if (text.charAt(text.length - 1) === '.') {
|
||||
setEnd(rng, endContainer, start - 1);
|
||||
}
|
||||
text = rng.toString().trim();
|
||||
matches = text.match(autoLinkPattern);
|
||||
if (matches) {
|
||||
if (matches[1] === 'www.') {
|
||||
matches[1] = 'http://www.';
|
||||
} else if (/@$/.test(matches[1]) && !/^mailto:/.test(matches[1])) {
|
||||
matches[1] = 'mailto:' + matches[1];
|
||||
}
|
||||
bookmark = editor.selection.getBookmark();
|
||||
editor.selection.setRng(rng);
|
||||
editor.execCommand('createlink', false, matches[1] + matches[2]);
|
||||
if (defaultLinkTarget) {
|
||||
editor.dom.setAttrib(editor.selection.getNode(), 'target', defaultLinkTarget);
|
||||
}
|
||||
editor.selection.moveToBookmark(bookmark);
|
||||
editor.nodeChanged();
|
||||
}
|
||||
};
|
||||
var setup = function (editor) {
|
||||
var autoUrlDetectState;
|
||||
editor.on('keydown', function (e) {
|
||||
if (e.keyCode === 13) {
|
||||
return handleEnter(editor);
|
||||
}
|
||||
});
|
||||
if (global$1.ie) {
|
||||
editor.on('focus', function () {
|
||||
if (!autoUrlDetectState) {
|
||||
autoUrlDetectState = true;
|
||||
try {
|
||||
editor.execCommand('AutoUrlDetect', false, true);
|
||||
} catch (ex) {
|
||||
}
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
editor.on('keypress', function (e) {
|
||||
if (e.keyCode === 41) {
|
||||
return handleEclipse(editor);
|
||||
}
|
||||
});
|
||||
editor.on('keyup', function (e) {
|
||||
if (e.keyCode === 32) {
|
||||
return handleSpacebar(editor);
|
||||
}
|
||||
});
|
||||
};
|
||||
var $_eary1x8gjh8lpud7 = { setup: setup };
|
||||
|
||||
try {
|
||||
editor.execCommand('AutoUrlDetect', false, true);
|
||||
} catch (ex) {
|
||||
// Ignore
|
||||
}
|
||||
}
|
||||
});
|
||||
global.add('autolink', function (editor) {
|
||||
$_eary1x8gjh8lpud7.setup(editor);
|
||||
});
|
||||
function Plugin () {
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
return Plugin;
|
||||
|
||||
editor.on("keypress", function(e) {
|
||||
if (e.keyCode == 41) {
|
||||
return handleEclipse(editor);
|
||||
}
|
||||
});
|
||||
|
||||
editor.on("keyup", function(e) {
|
||||
if (e.keyCode == 32) {
|
||||
return handleSpacebar(editor);
|
||||
}
|
||||
});
|
||||
|
||||
function handleEclipse(editor) {
|
||||
parseCurrentLine(editor, -1, '(', true);
|
||||
}
|
||||
|
||||
function handleSpacebar(editor) {
|
||||
parseCurrentLine(editor, 0, '', true);
|
||||
}
|
||||
|
||||
function handleEnter(editor) {
|
||||
parseCurrentLine(editor, -1, '', false);
|
||||
}
|
||||
|
||||
function parseCurrentLine(editor, end_offset, delimiter) {
|
||||
var rng, end, start, endContainer, bookmark, text, matches, prev, len, rngText;
|
||||
|
||||
function scopeIndex(container, index) {
|
||||
if (index < 0) {
|
||||
index = 0;
|
||||
}
|
||||
|
||||
if (container.nodeType == 3) {
|
||||
var len = container.data.length;
|
||||
|
||||
if (index > len) {
|
||||
index = len;
|
||||
}
|
||||
}
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
function setStart(container, offset) {
|
||||
if (container.nodeType != 1 || container.hasChildNodes()) {
|
||||
rng.setStart(container, scopeIndex(container, offset));
|
||||
} else {
|
||||
rng.setStartBefore(container);
|
||||
}
|
||||
}
|
||||
|
||||
function setEnd(container, offset) {
|
||||
if (container.nodeType != 1 || container.hasChildNodes()) {
|
||||
rng.setEnd(container, scopeIndex(container, offset));
|
||||
} else {
|
||||
rng.setEndAfter(container);
|
||||
}
|
||||
}
|
||||
|
||||
// We need at least five characters to form a URL,
|
||||
// hence, at minimum, five characters from the beginning of the line.
|
||||
rng = editor.selection.getRng(true).cloneRange();
|
||||
if (rng.startOffset < 5) {
|
||||
// During testing, the caret is placed inbetween two text nodes.
|
||||
// The previous text node contains the URL.
|
||||
prev = rng.endContainer.previousSibling;
|
||||
if (!prev) {
|
||||
if (!rng.endContainer.firstChild || !rng.endContainer.firstChild.nextSibling) {
|
||||
return;
|
||||
}
|
||||
|
||||
prev = rng.endContainer.firstChild.nextSibling;
|
||||
}
|
||||
|
||||
len = prev.length;
|
||||
setStart(prev, len);
|
||||
setEnd(prev, len);
|
||||
|
||||
if (rng.endOffset < 5) {
|
||||
return;
|
||||
}
|
||||
|
||||
end = rng.endOffset;
|
||||
endContainer = prev;
|
||||
} else {
|
||||
endContainer = rng.endContainer;
|
||||
|
||||
// Get a text node
|
||||
if (endContainer.nodeType != 3 && endContainer.firstChild) {
|
||||
while (endContainer.nodeType != 3 && endContainer.firstChild) {
|
||||
endContainer = endContainer.firstChild;
|
||||
}
|
||||
|
||||
// Move range to text node
|
||||
if (endContainer.nodeType == 3) {
|
||||
setStart(endContainer, 0);
|
||||
setEnd(endContainer, endContainer.nodeValue.length);
|
||||
}
|
||||
}
|
||||
|
||||
if (rng.endOffset == 1) {
|
||||
end = 2;
|
||||
} else {
|
||||
end = rng.endOffset - 1 - end_offset;
|
||||
}
|
||||
}
|
||||
|
||||
start = end;
|
||||
|
||||
do {
|
||||
// Move the selection one character backwards.
|
||||
setStart(endContainer, end >= 2 ? end - 2 : 0);
|
||||
setEnd(endContainer, end >= 1 ? end - 1 : 0);
|
||||
end -= 1;
|
||||
rngText = rng.toString();
|
||||
|
||||
// Loop until one of the following is found: a blank space, , delimiter, (end-2) >= 0
|
||||
} while (rngText != ' ' && rngText !== '' && rngText.charCodeAt(0) != 160 && (end - 2) >= 0 && rngText != delimiter);
|
||||
|
||||
if (rng.toString() == delimiter || rng.toString().charCodeAt(0) == 160) {
|
||||
setStart(endContainer, end);
|
||||
setEnd(endContainer, start);
|
||||
end += 1;
|
||||
} else if (rng.startOffset === 0) {
|
||||
setStart(endContainer, 0);
|
||||
setEnd(endContainer, start);
|
||||
} else {
|
||||
setStart(endContainer, end);
|
||||
setEnd(endContainer, start);
|
||||
}
|
||||
|
||||
// Exclude last . from word like "www.site.com."
|
||||
text = rng.toString();
|
||||
if (text.charAt(text.length - 1) == '.') {
|
||||
setEnd(endContainer, start - 1);
|
||||
}
|
||||
|
||||
text = rng.toString();
|
||||
matches = text.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i);
|
||||
|
||||
if (matches) {
|
||||
if (matches[1] == 'www.') {
|
||||
matches[1] = 'http://www.';
|
||||
} else if (/@$/.test(matches[1]) && !/^mailto:/.test(matches[1])) {
|
||||
matches[1] = 'mailto:' + matches[1];
|
||||
}
|
||||
|
||||
bookmark = editor.selection.getBookmark();
|
||||
|
||||
editor.selection.setRng(rng);
|
||||
editor.execCommand('createlink', false, matches[1] + matches[2]);
|
||||
editor.selection.moveToBookmark(bookmark);
|
||||
editor.nodeChanged();
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
})();
|
||||
|
||||
@@ -1 +1 @@
|
||||
tinymce.PluginManager.add("autolink",function(a){function b(a){e(a,-1,"(",!0)}function c(a){e(a,0,"",!0)}function d(a){e(a,-1,"",!1)}function e(a,b,c){function d(a,b){if(0>b&&(b=0),3==a.nodeType){var c=a.data.length;b>c&&(b=c)}return b}function e(a,b){1!=a.nodeType||a.hasChildNodes()?g.setStart(a,d(a,b)):g.setStartBefore(a)}function f(a,b){1!=a.nodeType||a.hasChildNodes()?g.setEnd(a,d(a,b)):g.setEndAfter(a)}var g,h,i,j,k,l,m,n,o,p;if(g=a.selection.getRng(!0).cloneRange(),g.startOffset<5){if(n=g.endContainer.previousSibling,!n){if(!g.endContainer.firstChild||!g.endContainer.firstChild.nextSibling)return;n=g.endContainer.firstChild.nextSibling}if(o=n.length,e(n,o),f(n,o),g.endOffset<5)return;h=g.endOffset,j=n}else{if(j=g.endContainer,3!=j.nodeType&&j.firstChild){for(;3!=j.nodeType&&j.firstChild;)j=j.firstChild;3==j.nodeType&&(e(j,0),f(j,j.nodeValue.length))}h=1==g.endOffset?2:g.endOffset-1-b}i=h;do e(j,h>=2?h-2:0),f(j,h>=1?h-1:0),h-=1,p=g.toString();while(" "!=p&&""!==p&&160!=p.charCodeAt(0)&&h-2>=0&&p!=c);g.toString()==c||160==g.toString().charCodeAt(0)?(e(j,h),f(j,i),h+=1):0===g.startOffset?(e(j,0),f(j,i)):(e(j,h),f(j,i)),l=g.toString(),"."==l.charAt(l.length-1)&&f(j,i-1),l=g.toString(),m=l.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i),m&&("www."==m[1]?m[1]="http://www.":/@$/.test(m[1])&&!/^mailto:/.test(m[1])&&(m[1]="mailto:"+m[1]),k=a.selection.getBookmark(),a.selection.setRng(g),a.execCommand("createlink",!1,m[1]+m[2]),a.selection.moveToBookmark(k),a.nodeChanged())}var f;return a.on("keydown",function(b){return 13==b.keyCode?d(a):void 0}),tinymce.Env.ie?void a.on("focus",function(){if(!f){f=!0;try{a.execCommand("AutoUrlDetect",!1,!0)}catch(b){}}}):(a.on("keypress",function(c){return 41==c.keyCode?b(a):void 0}),void a.on("keyup",function(b){return 32==b.keyCode?c(a):void 0}))});
|
||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=tinymce.util.Tools.resolve("tinymce.Env"),m=function(e){return e.getParam("autolink_pattern",/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i)},y=function(e){return e.getParam("default_link_target","")},o=function(e,t){if(t<0&&(t=0),3===e.nodeType){var n=e.data.length;n<t&&(t=n)}return t},k=function(e,t,n){1!==t.nodeType||t.hasChildNodes()?e.setStart(t,o(t,n)):e.setStartBefore(t)},p=function(e,t,n){1!==t.nodeType||t.hasChildNodes()?e.setEnd(t,o(t,n)):e.setEndAfter(t)},r=function(e,t,n){var i,o,r,a,f,s,d,l,c,u,g=m(e),h=y(e);if("A"!==e.selection.getNode().tagName){if((i=e.selection.getRng(!0).cloneRange()).startOffset<5){if(!(l=i.endContainer.previousSibling)){if(!i.endContainer.firstChild||!i.endContainer.firstChild.nextSibling)return;l=i.endContainer.firstChild.nextSibling}if(c=l.length,k(i,l,c),p(i,l,c),i.endOffset<5)return;o=i.endOffset,a=l}else{if(3!==(a=i.endContainer).nodeType&&a.firstChild){for(;3!==a.nodeType&&a.firstChild;)a=a.firstChild;3===a.nodeType&&(k(i,a,0),p(i,a,a.nodeValue.length))}o=1===i.endOffset?2:i.endOffset-1-t}for(r=o;k(i,a,2<=o?o-2:0),p(i,a,1<=o?o-1:0),o-=1," "!==(u=i.toString())&&""!==u&&160!==u.charCodeAt(0)&&0<=o-2&&u!==n;);var C;(C=i.toString())===n||" "===C||160===C.charCodeAt(0)?(k(i,a,o),p(i,a,r),o+=1):(0===i.startOffset?k(i,a,0):k(i,a,o),p(i,a,r)),"."===(s=i.toString()).charAt(s.length-1)&&p(i,a,r-1),(d=(s=i.toString().trim()).match(g))&&("www."===d[1]?d[1]="http://www.":/@$/.test(d[1])&&!/^mailto:/.test(d[1])&&(d[1]="mailto:"+d[1]),f=e.selection.getBookmark(),e.selection.setRng(i),e.execCommand("createlink",!1,d[1]+d[2]),h&&e.dom.setAttrib(e.selection.getNode(),"target",h),e.selection.moveToBookmark(f),e.nodeChanged())}},t=function(t){var n;t.on("keydown",function(e){13!==e.keyCode||r(t,-1,"")}),i.ie?t.on("focus",function(){if(!n){n=!0;try{t.execCommand("AutoUrlDetect",!1,!0)}catch(e){}}}):(t.on("keypress",function(e){41!==e.keyCode||r(t,-1,"(")}),t.on("keyup",function(e){32!==e.keyCode||r(t,0,"")}))};e.add("autolink",function(e){t(e)})}();
|
||||
@@ -0,0 +1,7 @@
|
||||
// Exports the "autoresize" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/autoresize')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/autoresize'
|
||||
require('./plugin.js');
|
||||
@@ -1,162 +1,169 @@
|
||||
/**
|
||||
* plugin.js
|
||||
*
|
||||
* Copyright, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
(function () {
|
||||
var autoresize = (function () {
|
||||
'use strict';
|
||||
|
||||
/*global tinymce:true */
|
||||
/*eslint no-nested-ternary:0 */
|
||||
var Cell = function (initial) {
|
||||
var value = initial;
|
||||
var get = function () {
|
||||
return value;
|
||||
};
|
||||
var set = function (v) {
|
||||
value = v;
|
||||
};
|
||||
var clone = function () {
|
||||
return Cell(get());
|
||||
};
|
||||
return {
|
||||
get: get,
|
||||
set: set,
|
||||
clone: clone
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Auto Resize
|
||||
*
|
||||
* This plugin automatically resizes the content area to fit its content height.
|
||||
* It will retain a minimum height, which is the height of the content area when
|
||||
* it's initialized.
|
||||
*/
|
||||
tinymce.PluginManager.add('autoresize', function(editor) {
|
||||
var settings = editor.settings, oldSize = 0;
|
||||
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
||||
|
||||
function isFullscreen() {
|
||||
return editor.plugins.fullscreen && editor.plugins.fullscreen.isFullscreen();
|
||||
}
|
||||
var global$1 = tinymce.util.Tools.resolve('tinymce.Env');
|
||||
|
||||
if (editor.settings.inline) {
|
||||
return;
|
||||
}
|
||||
var global$2 = tinymce.util.Tools.resolve('tinymce.util.Delay');
|
||||
|
||||
/**
|
||||
* This method gets executed each time the editor needs to resize.
|
||||
*/
|
||||
function resize(e) {
|
||||
var deltaSize, doc, body, docElm, DOM = tinymce.DOM, resizeHeight, myHeight,
|
||||
marginTop, marginBottom, paddingTop, paddingBottom, borderTop, borderBottom;
|
||||
var getAutoResizeMinHeight = function (editor) {
|
||||
return parseInt(editor.getParam('autoresize_min_height', editor.getElement().offsetHeight), 10);
|
||||
};
|
||||
var getAutoResizeMaxHeight = function (editor) {
|
||||
return parseInt(editor.getParam('autoresize_max_height', 0), 10);
|
||||
};
|
||||
var getAutoResizeOverflowPadding = function (editor) {
|
||||
return editor.getParam('autoresize_overflow_padding', 1);
|
||||
};
|
||||
var getAutoResizeBottomMargin = function (editor) {
|
||||
return editor.getParam('autoresize_bottom_margin', 50);
|
||||
};
|
||||
var shouldAutoResizeOnInit = function (editor) {
|
||||
return editor.getParam('autoresize_on_init', true);
|
||||
};
|
||||
var $_azyemt8qjh8lpue0 = {
|
||||
getAutoResizeMinHeight: getAutoResizeMinHeight,
|
||||
getAutoResizeMaxHeight: getAutoResizeMaxHeight,
|
||||
getAutoResizeOverflowPadding: getAutoResizeOverflowPadding,
|
||||
getAutoResizeBottomMargin: getAutoResizeBottomMargin,
|
||||
shouldAutoResizeOnInit: shouldAutoResizeOnInit
|
||||
};
|
||||
|
||||
doc = editor.getDoc();
|
||||
if (!doc) {
|
||||
return;
|
||||
}
|
||||
var isFullscreen = function (editor) {
|
||||
return editor.plugins.fullscreen && editor.plugins.fullscreen.isFullscreen();
|
||||
};
|
||||
var wait = function (editor, oldSize, times, interval, callback) {
|
||||
global$2.setEditorTimeout(editor, function () {
|
||||
resize(editor, oldSize);
|
||||
if (times--) {
|
||||
wait(editor, oldSize, times, interval, callback);
|
||||
} else if (callback) {
|
||||
callback();
|
||||
}
|
||||
}, interval);
|
||||
};
|
||||
var toggleScrolling = function (editor, state) {
|
||||
var body = editor.getBody();
|
||||
if (body) {
|
||||
body.style.overflowY = state ? '' : 'hidden';
|
||||
if (!state) {
|
||||
body.scrollTop = 0;
|
||||
}
|
||||
}
|
||||
};
|
||||
var resize = function (editor, oldSize) {
|
||||
var deltaSize, doc, body, resizeHeight, myHeight;
|
||||
var marginTop, marginBottom, paddingTop, paddingBottom, borderTop, borderBottom;
|
||||
var dom = editor.dom;
|
||||
doc = editor.getDoc();
|
||||
if (!doc) {
|
||||
return;
|
||||
}
|
||||
if (isFullscreen(editor)) {
|
||||
toggleScrolling(editor, true);
|
||||
return;
|
||||
}
|
||||
body = doc.body;
|
||||
resizeHeight = $_azyemt8qjh8lpue0.getAutoResizeMinHeight(editor);
|
||||
marginTop = dom.getStyle(body, 'margin-top', true);
|
||||
marginBottom = dom.getStyle(body, 'margin-bottom', true);
|
||||
paddingTop = dom.getStyle(body, 'padding-top', true);
|
||||
paddingBottom = dom.getStyle(body, 'padding-bottom', true);
|
||||
borderTop = dom.getStyle(body, 'border-top-width', true);
|
||||
borderBottom = dom.getStyle(body, 'border-bottom-width', true);
|
||||
myHeight = body.offsetHeight + parseInt(marginTop, 10) + parseInt(marginBottom, 10) + parseInt(paddingTop, 10) + parseInt(paddingBottom, 10) + parseInt(borderTop, 10) + parseInt(borderBottom, 10);
|
||||
if (isNaN(myHeight) || myHeight <= 0) {
|
||||
myHeight = global$1.ie ? body.scrollHeight : global$1.webkit && body.clientHeight === 0 ? 0 : body.offsetHeight;
|
||||
}
|
||||
if (myHeight > $_azyemt8qjh8lpue0.getAutoResizeMinHeight(editor)) {
|
||||
resizeHeight = myHeight;
|
||||
}
|
||||
var maxHeight = $_azyemt8qjh8lpue0.getAutoResizeMaxHeight(editor);
|
||||
if (maxHeight && myHeight > maxHeight) {
|
||||
resizeHeight = maxHeight;
|
||||
toggleScrolling(editor, true);
|
||||
} else {
|
||||
toggleScrolling(editor, false);
|
||||
}
|
||||
if (resizeHeight !== oldSize.get()) {
|
||||
deltaSize = resizeHeight - oldSize.get();
|
||||
dom.setStyle(editor.iframeElement, 'height', resizeHeight + 'px');
|
||||
oldSize.set(resizeHeight);
|
||||
if (global$1.webkit && deltaSize < 0) {
|
||||
resize(editor, oldSize);
|
||||
}
|
||||
}
|
||||
};
|
||||
var setup = function (editor, oldSize) {
|
||||
editor.on('init', function () {
|
||||
var overflowPadding, bottomMargin;
|
||||
var dom = editor.dom;
|
||||
overflowPadding = $_azyemt8qjh8lpue0.getAutoResizeOverflowPadding(editor);
|
||||
bottomMargin = $_azyemt8qjh8lpue0.getAutoResizeBottomMargin(editor);
|
||||
if (overflowPadding !== false) {
|
||||
dom.setStyles(editor.getBody(), {
|
||||
paddingLeft: overflowPadding,
|
||||
paddingRight: overflowPadding
|
||||
});
|
||||
}
|
||||
if (bottomMargin !== false) {
|
||||
dom.setStyles(editor.getBody(), { paddingBottom: bottomMargin });
|
||||
}
|
||||
});
|
||||
editor.on('nodechange setcontent keyup FullscreenStateChanged', function (e) {
|
||||
resize(editor, oldSize);
|
||||
});
|
||||
if ($_azyemt8qjh8lpue0.shouldAutoResizeOnInit(editor)) {
|
||||
editor.on('init', function () {
|
||||
wait(editor, oldSize, 20, 100, function () {
|
||||
wait(editor, oldSize, 5, 1000);
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
var $_rs2t18njh8lpudw = {
|
||||
setup: setup,
|
||||
resize: resize
|
||||
};
|
||||
|
||||
body = doc.body;
|
||||
docElm = doc.documentElement;
|
||||
resizeHeight = settings.autoresize_min_height;
|
||||
var register = function (editor, oldSize) {
|
||||
editor.addCommand('mceAutoResize', function () {
|
||||
$_rs2t18njh8lpudw.resize(editor, oldSize);
|
||||
});
|
||||
};
|
||||
var $_b0t1u48mjh8lpudv = { register: register };
|
||||
|
||||
if (!body || (e && e.type === "setcontent" && e.initial) || isFullscreen()) {
|
||||
if (body && docElm) {
|
||||
body.style.overflowY = "auto";
|
||||
docElm.style.overflowY = "auto"; // Old IE
|
||||
}
|
||||
global.add('autoresize', function (editor) {
|
||||
if (!editor.inline) {
|
||||
var oldSize = Cell(0);
|
||||
$_b0t1u48mjh8lpudv.register(editor, oldSize);
|
||||
$_rs2t18njh8lpudw.setup(editor, oldSize);
|
||||
}
|
||||
});
|
||||
function Plugin () {
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
return Plugin;
|
||||
|
||||
// Calculate outer height of the body element using CSS styles
|
||||
marginTop = editor.dom.getStyle(body, 'margin-top', true);
|
||||
marginBottom = editor.dom.getStyle(body, 'margin-bottom', true);
|
||||
paddingTop = editor.dom.getStyle(body, 'padding-top', true);
|
||||
paddingBottom = editor.dom.getStyle(body, 'padding-bottom', true);
|
||||
borderTop = editor.dom.getStyle(body, 'border-top-width', true);
|
||||
borderBottom = editor.dom.getStyle(body, 'border-bottom-width', true);
|
||||
myHeight = body.offsetHeight + parseInt(marginTop, 10) + parseInt(marginBottom, 10) +
|
||||
parseInt(paddingTop, 10) + parseInt(paddingBottom, 10) +
|
||||
parseInt(borderTop, 10) + parseInt(borderBottom, 10);
|
||||
|
||||
// Make sure we have a valid height
|
||||
if (isNaN(myHeight) || myHeight <= 0) {
|
||||
// Get height differently depending on the browser used
|
||||
myHeight = tinymce.Env.ie ? body.scrollHeight : (tinymce.Env.webkit && body.clientHeight === 0 ? 0 : body.offsetHeight);
|
||||
}
|
||||
|
||||
// Don't make it smaller than the minimum height
|
||||
if (myHeight > settings.autoresize_min_height) {
|
||||
resizeHeight = myHeight;
|
||||
}
|
||||
|
||||
// If a maximum height has been defined don't exceed this height
|
||||
if (settings.autoresize_max_height && myHeight > settings.autoresize_max_height) {
|
||||
resizeHeight = settings.autoresize_max_height;
|
||||
body.style.overflowY = "auto";
|
||||
docElm.style.overflowY = "auto"; // Old IE
|
||||
} else {
|
||||
body.style.overflowY = "hidden";
|
||||
docElm.style.overflowY = "hidden"; // Old IE
|
||||
body.scrollTop = 0;
|
||||
}
|
||||
|
||||
// Resize content element
|
||||
if (resizeHeight !== oldSize) {
|
||||
deltaSize = resizeHeight - oldSize;
|
||||
DOM.setStyle(editor.iframeElement, 'height', resizeHeight + 'px');
|
||||
oldSize = resizeHeight;
|
||||
|
||||
// WebKit doesn't decrease the size of the body element until the iframe gets resized
|
||||
// So we need to continue to resize the iframe down until the size gets fixed
|
||||
if (tinymce.isWebKit && deltaSize < 0) {
|
||||
resize(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Calls the resize x times in 100ms intervals. We can't wait for load events since
|
||||
* the CSS files might load async.
|
||||
*/
|
||||
function wait(times, interval, callback) {
|
||||
setTimeout(function() {
|
||||
resize({});
|
||||
|
||||
if (times--) {
|
||||
wait(times, interval, callback);
|
||||
} else if (callback) {
|
||||
callback();
|
||||
}
|
||||
}, interval);
|
||||
}
|
||||
|
||||
// Define minimum height
|
||||
settings.autoresize_min_height = parseInt(editor.getParam('autoresize_min_height', editor.getElement().offsetHeight), 10);
|
||||
|
||||
// Define maximum height
|
||||
settings.autoresize_max_height = parseInt(editor.getParam('autoresize_max_height', 0), 10);
|
||||
|
||||
// Add padding at the bottom for better UX
|
||||
editor.on("init", function() {
|
||||
var overflowPadding, bottomMargin;
|
||||
|
||||
overflowPadding = editor.getParam('autoresize_overflow_padding', 1);
|
||||
bottomMargin = editor.getParam('autoresize_bottom_margin', 50);
|
||||
|
||||
if (overflowPadding !== false) {
|
||||
editor.dom.setStyles(editor.getBody(), {
|
||||
paddingLeft: overflowPadding,
|
||||
paddingRight: overflowPadding
|
||||
});
|
||||
}
|
||||
|
||||
if (bottomMargin !== false) {
|
||||
editor.dom.setStyles(editor.getBody(), {
|
||||
paddingBottom: bottomMargin
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Add appropriate listeners for resizing content area
|
||||
editor.on("nodechange setcontent keyup FullscreenStateChanged", resize);
|
||||
|
||||
if (editor.getParam('autoresize_on_init', true)) {
|
||||
editor.on('init', function() {
|
||||
// Hit it 20 times in 100 ms intervals
|
||||
wait(20, 100, function() {
|
||||
// Hit it 5 times in 1 sec intervals
|
||||
wait(5, 1000);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');
|
||||
editor.addCommand('mceAutoResize', resize);
|
||||
});
|
||||
}());
|
||||
})();
|
||||
|
||||
@@ -1 +1 @@
|
||||
tinymce.PluginManager.add("autoresize",function(a){function b(){return a.plugins.fullscreen&&a.plugins.fullscreen.isFullscreen()}function c(d){var g,h,i,j,k,l,m,n,o,p,q,r,s=tinymce.DOM;if(h=a.getDoc()){if(i=h.body,j=h.documentElement,k=e.autoresize_min_height,!i||d&&"setcontent"===d.type&&d.initial||b())return void(i&&j&&(i.style.overflowY="auto",j.style.overflowY="auto"));m=a.dom.getStyle(i,"margin-top",!0),n=a.dom.getStyle(i,"margin-bottom",!0),o=a.dom.getStyle(i,"padding-top",!0),p=a.dom.getStyle(i,"padding-bottom",!0),q=a.dom.getStyle(i,"border-top-width",!0),r=a.dom.getStyle(i,"border-bottom-width",!0),l=i.offsetHeight+parseInt(m,10)+parseInt(n,10)+parseInt(o,10)+parseInt(p,10)+parseInt(q,10)+parseInt(r,10),(isNaN(l)||0>=l)&&(l=tinymce.Env.ie?i.scrollHeight:tinymce.Env.webkit&&0===i.clientHeight?0:i.offsetHeight),l>e.autoresize_min_height&&(k=l),e.autoresize_max_height&&l>e.autoresize_max_height?(k=e.autoresize_max_height,i.style.overflowY="auto",j.style.overflowY="auto"):(i.style.overflowY="hidden",j.style.overflowY="hidden",i.scrollTop=0),k!==f&&(g=k-f,s.setStyle(a.iframeElement,"height",k+"px"),f=k,tinymce.isWebKit&&0>g&&c(d))}}function d(a,b,e){setTimeout(function(){c({}),a--?d(a,b,e):e&&e()},b)}var e=a.settings,f=0;a.settings.inline||(e.autoresize_min_height=parseInt(a.getParam("autoresize_min_height",a.getElement().offsetHeight),10),e.autoresize_max_height=parseInt(a.getParam("autoresize_max_height",0),10),a.on("init",function(){var b,c;b=a.getParam("autoresize_overflow_padding",1),c=a.getParam("autoresize_bottom_margin",50),b!==!1&&a.dom.setStyles(a.getBody(),{paddingLeft:b,paddingRight:b}),c!==!1&&a.dom.setStyles(a.getBody(),{paddingBottom:c})}),a.on("nodechange setcontent keyup FullscreenStateChanged",c),a.getParam("autoresize_on_init",!0)&&a.on("init",function(){d(20,100,function(){d(5,1e3)})}),a.addCommand("mceAutoResize",c))});
|
||||
!function(){"use strict";var i=function(t){var e=t,n=function(){return e};return{get:n,set:function(t){e=t},clone:function(){return i(n())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),y=tinymce.util.Tools.resolve("tinymce.Env"),r=tinymce.util.Tools.resolve("tinymce.util.Delay"),h=function(t){return parseInt(t.getParam("autoresize_min_height",t.getElement().offsetHeight),10)},v=function(t){return parseInt(t.getParam("autoresize_max_height",0),10)},o=function(t){return t.getParam("autoresize_overflow_padding",1)},a=function(t){return t.getParam("autoresize_bottom_margin",50)},n=function(t){return t.getParam("autoresize_on_init",!0)},u=function(t,e,n,i,o){r.setEditorTimeout(t,function(){_(t,e),n--?u(t,e,n,i,o):o&&o()},i)},S=function(t,e){var n=t.getBody();n&&(n.style.overflowY=e?"":"hidden",e||(n.scrollTop=0))},_=function(t,e){var n,i,o,r,a,u,s,l,g,c,f,d=t.dom;if(i=t.getDoc())if((m=t).plugins.fullscreen&&m.plugins.fullscreen.isFullscreen())S(t,!0);else{var m;o=i.body,r=h(t),u=d.getStyle(o,"margin-top",!0),s=d.getStyle(o,"margin-bottom",!0),l=d.getStyle(o,"padding-top",!0),g=d.getStyle(o,"padding-bottom",!0),c=d.getStyle(o,"border-top-width",!0),f=d.getStyle(o,"border-bottom-width",!0),a=o.offsetHeight+parseInt(u,10)+parseInt(s,10)+parseInt(l,10)+parseInt(g,10)+parseInt(c,10)+parseInt(f,10),(isNaN(a)||a<=0)&&(a=y.ie?o.scrollHeight:y.webkit&&0===o.clientHeight?0:o.offsetHeight),a>h(t)&&(r=a);var p=v(t);p&&p<a?(r=p,S(t,!0)):S(t,!1),r!==e.get()&&(n=r-e.get(),d.setStyle(t.iframeElement,"height",r+"px"),e.set(r),y.webkit&&n<0&&_(t,e))}},s={setup:function(i,e){i.on("init",function(){var t,e,n=i.dom;t=o(i),e=a(i),!1!==t&&n.setStyles(i.getBody(),{paddingLeft:t,paddingRight:t}),!1!==e&&n.setStyles(i.getBody(),{paddingBottom:e})}),i.on("nodechange setcontent keyup FullscreenStateChanged",function(t){_(i,e)}),n(i)&&i.on("init",function(){u(i,e,20,100,function(){u(i,e,5,1e3)})})},resize:_},l=function(t,e){t.addCommand("mceAutoResize",function(){s.resize(t,e)})};t.add("autoresize",function(t){if(!t.inline){var e=i(0);l(t,e),s.setup(t,e)}})}();
|
||||
@@ -0,0 +1,7 @@
|
||||
// Exports the "autosave" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/autosave')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/autosave'
|
||||
require('./plugin.js');
|
||||
@@ -1,165 +1,226 @@
|
||||
/**
|
||||
* plugin.js
|
||||
*
|
||||
* Copyright, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
(function () {
|
||||
var autosave = (function () {
|
||||
'use strict';
|
||||
|
||||
/*global tinymce:true */
|
||||
var Cell = function (initial) {
|
||||
var value = initial;
|
||||
var get = function () {
|
||||
return value;
|
||||
};
|
||||
var set = function (v) {
|
||||
value = v;
|
||||
};
|
||||
var clone = function () {
|
||||
return Cell(get());
|
||||
};
|
||||
return {
|
||||
get: get,
|
||||
set: set,
|
||||
clone: clone
|
||||
};
|
||||
};
|
||||
|
||||
// Internal unload handler will be called before the page is unloaded
|
||||
// Needs to be outside the plugin since it would otherwise keep
|
||||
// a reference to editor in closue scope
|
||||
/*eslint no-func-assign:0 */
|
||||
tinymce._beforeUnloadHandler = function() {
|
||||
var msg;
|
||||
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
||||
|
||||
tinymce.each(tinymce.editors, function(editor) {
|
||||
// Store a draft for each editor instance
|
||||
if (editor.plugins.autosave) {
|
||||
editor.plugins.autosave.storeDraft();
|
||||
}
|
||||
var global$1 = tinymce.util.Tools.resolve('tinymce.util.LocalStorage');
|
||||
|
||||
// Setup a return message if the editor is dirty
|
||||
if (!msg && editor.isDirty() && editor.getParam("autosave_ask_before_unload", true)) {
|
||||
msg = editor.translate("You have unsaved changes are you sure you want to navigate away?");
|
||||
}
|
||||
});
|
||||
var global$2 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
||||
|
||||
return msg;
|
||||
};
|
||||
var fireRestoreDraft = function (editor) {
|
||||
return editor.fire('RestoreDraft');
|
||||
};
|
||||
var fireStoreDraft = function (editor) {
|
||||
return editor.fire('StoreDraft');
|
||||
};
|
||||
var fireRemoveDraft = function (editor) {
|
||||
return editor.fire('RemoveDraft');
|
||||
};
|
||||
var $_f1sskd8yjh8lpueq = {
|
||||
fireRestoreDraft: fireRestoreDraft,
|
||||
fireStoreDraft: fireStoreDraft,
|
||||
fireRemoveDraft: fireRemoveDraft
|
||||
};
|
||||
|
||||
tinymce.PluginManager.add('autosave', function(editor) {
|
||||
var settings = editor.settings, LocalStorage = tinymce.util.LocalStorage, prefix, started;
|
||||
var parse = function (time, defaultTime) {
|
||||
var multiples = {
|
||||
s: 1000,
|
||||
m: 60000
|
||||
};
|
||||
time = /^(\d+)([ms]?)$/.exec('' + (time || defaultTime));
|
||||
return (time[2] ? multiples[time[2]] : 1) * parseInt(time, 10);
|
||||
};
|
||||
var $_53ht7990jh8lpuet = { parse: parse };
|
||||
|
||||
prefix = settings.autosave_prefix || 'tinymce-autosave-{path}{query}-{id}-';
|
||||
prefix = prefix.replace(/\{path\}/g, document.location.pathname);
|
||||
prefix = prefix.replace(/\{query\}/g, document.location.search);
|
||||
prefix = prefix.replace(/\{id\}/g, editor.id);
|
||||
var shouldAskBeforeUnload = function (editor) {
|
||||
return editor.getParam('autosave_ask_before_unload', true);
|
||||
};
|
||||
var getAutoSavePrefix = function (editor) {
|
||||
var prefix = editor.getParam('autosave_prefix', 'tinymce-autosave-{path}{query}{hash}-{id}-');
|
||||
prefix = prefix.replace(/\{path\}/g, document.location.pathname);
|
||||
prefix = prefix.replace(/\{query\}/g, document.location.search);
|
||||
prefix = prefix.replace(/\{hash\}/g, document.location.hash);
|
||||
prefix = prefix.replace(/\{id\}/g, editor.id);
|
||||
return prefix;
|
||||
};
|
||||
var shouldRestoreWhenEmpty = function (editor) {
|
||||
return editor.getParam('autosave_restore_when_empty', false);
|
||||
};
|
||||
var getAutoSaveInterval = function (editor) {
|
||||
return $_53ht7990jh8lpuet.parse(editor.settings.autosave_interval, '30s');
|
||||
};
|
||||
var getAutoSaveRetention = function (editor) {
|
||||
return $_53ht7990jh8lpuet.parse(editor.settings.autosave_retention, '20m');
|
||||
};
|
||||
var $_2f8zxp8zjh8lpuer = {
|
||||
shouldAskBeforeUnload: shouldAskBeforeUnload,
|
||||
getAutoSavePrefix: getAutoSavePrefix,
|
||||
shouldRestoreWhenEmpty: shouldRestoreWhenEmpty,
|
||||
getAutoSaveInterval: getAutoSaveInterval,
|
||||
getAutoSaveRetention: getAutoSaveRetention
|
||||
};
|
||||
|
||||
function parseTime(time, defaultTime) {
|
||||
var multipels = {
|
||||
s: 1000,
|
||||
m: 60000
|
||||
};
|
||||
var isEmpty = function (editor, html) {
|
||||
var forcedRootBlockName = editor.settings.forced_root_block;
|
||||
html = global$2.trim(typeof html === 'undefined' ? editor.getBody().innerHTML : html);
|
||||
return html === '' || new RegExp('^<' + forcedRootBlockName + '[^>]*>((\xA0| |[ \t]|<br[^>]*>)+?|)</' + forcedRootBlockName + '>|<br>$', 'i').test(html);
|
||||
};
|
||||
var hasDraft = function (editor) {
|
||||
var time = parseInt(global$1.getItem($_2f8zxp8zjh8lpuer.getAutoSavePrefix(editor) + 'time'), 10) || 0;
|
||||
if (new Date().getTime() - time > $_2f8zxp8zjh8lpuer.getAutoSaveRetention(editor)) {
|
||||
removeDraft(editor, false);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
var removeDraft = function (editor, fire) {
|
||||
var prefix = $_2f8zxp8zjh8lpuer.getAutoSavePrefix(editor);
|
||||
global$1.removeItem(prefix + 'draft');
|
||||
global$1.removeItem(prefix + 'time');
|
||||
if (fire !== false) {
|
||||
$_f1sskd8yjh8lpueq.fireRemoveDraft(editor);
|
||||
}
|
||||
};
|
||||
var storeDraft = function (editor) {
|
||||
var prefix = $_2f8zxp8zjh8lpuer.getAutoSavePrefix(editor);
|
||||
if (!isEmpty(editor) && editor.isDirty()) {
|
||||
global$1.setItem(prefix + 'draft', editor.getContent({
|
||||
format: 'raw',
|
||||
no_events: true
|
||||
}));
|
||||
global$1.setItem(prefix + 'time', new Date().getTime().toString());
|
||||
$_f1sskd8yjh8lpueq.fireStoreDraft(editor);
|
||||
}
|
||||
};
|
||||
var restoreDraft = function (editor) {
|
||||
var prefix = $_2f8zxp8zjh8lpuer.getAutoSavePrefix(editor);
|
||||
if (hasDraft(editor)) {
|
||||
editor.setContent(global$1.getItem(prefix + 'draft'), { format: 'raw' });
|
||||
$_f1sskd8yjh8lpueq.fireRestoreDraft(editor);
|
||||
}
|
||||
};
|
||||
var startStoreDraft = function (editor, started) {
|
||||
var interval = $_2f8zxp8zjh8lpuer.getAutoSaveInterval(editor);
|
||||
if (!started.get()) {
|
||||
setInterval(function () {
|
||||
if (!editor.removed) {
|
||||
storeDraft(editor);
|
||||
}
|
||||
}, interval);
|
||||
started.set(true);
|
||||
}
|
||||
};
|
||||
var restoreLastDraft = function (editor) {
|
||||
editor.undoManager.transact(function () {
|
||||
restoreDraft(editor);
|
||||
removeDraft(editor);
|
||||
});
|
||||
editor.focus();
|
||||
};
|
||||
var $_rquxx8vjh8lpuem = {
|
||||
isEmpty: isEmpty,
|
||||
hasDraft: hasDraft,
|
||||
removeDraft: removeDraft,
|
||||
storeDraft: storeDraft,
|
||||
restoreDraft: restoreDraft,
|
||||
startStoreDraft: startStoreDraft,
|
||||
restoreLastDraft: restoreLastDraft
|
||||
};
|
||||
|
||||
time = /^(\d+)([ms]?)$/.exec('' + (time || defaultTime));
|
||||
var curry = function (f, editor) {
|
||||
return function () {
|
||||
var args = Array.prototype.slice.call(arguments);
|
||||
return f.apply(null, [editor].concat(args));
|
||||
};
|
||||
};
|
||||
var get = function (editor) {
|
||||
return {
|
||||
hasDraft: curry($_rquxx8vjh8lpuem.hasDraft, editor),
|
||||
storeDraft: curry($_rquxx8vjh8lpuem.storeDraft, editor),
|
||||
restoreDraft: curry($_rquxx8vjh8lpuem.restoreDraft, editor),
|
||||
removeDraft: curry($_rquxx8vjh8lpuem.removeDraft, editor),
|
||||
isEmpty: curry($_rquxx8vjh8lpuem.isEmpty, editor)
|
||||
};
|
||||
};
|
||||
var $_7mdhyp8ujh8lpuek = { get: get };
|
||||
|
||||
return (time[2] ? multipels[time[2]] : 1) * parseInt(time, 10);
|
||||
}
|
||||
var global$3 = tinymce.util.Tools.resolve('tinymce.EditorManager');
|
||||
|
||||
function hasDraft() {
|
||||
var time = parseInt(LocalStorage.getItem(prefix + "time"), 10) || 0;
|
||||
global$3._beforeUnloadHandler = function () {
|
||||
var msg;
|
||||
global$2.each(global$3.get(), function (editor) {
|
||||
if (editor.plugins.autosave) {
|
||||
editor.plugins.autosave.storeDraft();
|
||||
}
|
||||
if (!msg && editor.isDirty() && $_2f8zxp8zjh8lpuer.shouldAskBeforeUnload(editor)) {
|
||||
msg = editor.translate('You have unsaved changes are you sure you want to navigate away?');
|
||||
}
|
||||
});
|
||||
return msg;
|
||||
};
|
||||
var setup = function (editor) {
|
||||
window.onbeforeunload = global$3._beforeUnloadHandler;
|
||||
};
|
||||
var $_3yv5rq91jh8lpuev = { setup: setup };
|
||||
|
||||
if (new Date().getTime() - time > settings.autosave_retention) {
|
||||
removeDraft(false);
|
||||
return false;
|
||||
}
|
||||
var postRender = function (editor, started) {
|
||||
return function (e) {
|
||||
var ctrl = e.control;
|
||||
ctrl.disabled(!$_rquxx8vjh8lpuem.hasDraft(editor));
|
||||
editor.on('StoreDraft RestoreDraft RemoveDraft', function () {
|
||||
ctrl.disabled(!$_rquxx8vjh8lpuem.hasDraft(editor));
|
||||
});
|
||||
$_rquxx8vjh8lpuem.startStoreDraft(editor, started);
|
||||
};
|
||||
};
|
||||
var register = function (editor, started) {
|
||||
editor.addButton('restoredraft', {
|
||||
title: 'Restore last draft',
|
||||
onclick: function () {
|
||||
$_rquxx8vjh8lpuem.restoreLastDraft(editor);
|
||||
},
|
||||
onPostRender: postRender(editor, started)
|
||||
});
|
||||
editor.addMenuItem('restoredraft', {
|
||||
text: 'Restore last draft',
|
||||
onclick: function () {
|
||||
$_rquxx8vjh8lpuem.restoreLastDraft(editor);
|
||||
},
|
||||
onPostRender: postRender(editor, started),
|
||||
context: 'file'
|
||||
});
|
||||
};
|
||||
var $_sngoy93jh8lpuex = { register: register };
|
||||
|
||||
return true;
|
||||
}
|
||||
global.add('autosave', function (editor) {
|
||||
var started = Cell(false);
|
||||
$_3yv5rq91jh8lpuev.setup(editor);
|
||||
$_sngoy93jh8lpuex.register(editor, started);
|
||||
return $_7mdhyp8ujh8lpuek.get(editor);
|
||||
});
|
||||
function Plugin () {
|
||||
}
|
||||
|
||||
function removeDraft(fire) {
|
||||
LocalStorage.removeItem(prefix + "draft");
|
||||
LocalStorage.removeItem(prefix + "time");
|
||||
return Plugin;
|
||||
|
||||
if (fire !== false) {
|
||||
editor.fire('RemoveDraft');
|
||||
}
|
||||
}
|
||||
|
||||
function storeDraft() {
|
||||
if (!isEmpty() && editor.isDirty()) {
|
||||
LocalStorage.setItem(prefix + "draft", editor.getContent({format: 'raw', no_events: true}));
|
||||
LocalStorage.setItem(prefix + "time", new Date().getTime());
|
||||
editor.fire('StoreDraft');
|
||||
}
|
||||
}
|
||||
|
||||
function restoreDraft() {
|
||||
if (hasDraft()) {
|
||||
editor.setContent(LocalStorage.getItem(prefix + "draft"), {format: 'raw'});
|
||||
editor.fire('RestoreDraft');
|
||||
}
|
||||
}
|
||||
|
||||
function startStoreDraft() {
|
||||
if (!started) {
|
||||
setInterval(function() {
|
||||
if (!editor.removed) {
|
||||
storeDraft();
|
||||
}
|
||||
}, settings.autosave_interval);
|
||||
|
||||
started = true;
|
||||
}
|
||||
}
|
||||
|
||||
settings.autosave_interval = parseTime(settings.autosave_interval, '30s');
|
||||
settings.autosave_retention = parseTime(settings.autosave_retention, '20m');
|
||||
|
||||
function postRender() {
|
||||
var self = this;
|
||||
|
||||
self.disabled(!hasDraft());
|
||||
|
||||
editor.on('StoreDraft RestoreDraft RemoveDraft', function() {
|
||||
self.disabled(!hasDraft());
|
||||
});
|
||||
|
||||
startStoreDraft();
|
||||
}
|
||||
|
||||
function restoreLastDraft() {
|
||||
editor.undoManager.beforeChange();
|
||||
restoreDraft();
|
||||
removeDraft();
|
||||
editor.undoManager.add();
|
||||
}
|
||||
|
||||
editor.addButton('restoredraft', {
|
||||
title: 'Restore last draft',
|
||||
onclick: restoreLastDraft,
|
||||
onPostRender: postRender
|
||||
});
|
||||
|
||||
editor.addMenuItem('restoredraft', {
|
||||
text: 'Restore last draft',
|
||||
onclick: restoreLastDraft,
|
||||
onPostRender: postRender,
|
||||
context: 'file'
|
||||
});
|
||||
|
||||
function isEmpty(html) {
|
||||
var forcedRootBlockName = editor.settings.forced_root_block;
|
||||
|
||||
html = tinymce.trim(typeof html == "undefined" ? editor.getBody().innerHTML : html);
|
||||
|
||||
return html === '' || new RegExp(
|
||||
'^<' + forcedRootBlockName + '[^>]*>((\u00a0| |[ \t]|<br[^>]*>)+?|)<\/' + forcedRootBlockName + '>|<br>$', 'i'
|
||||
).test(html);
|
||||
}
|
||||
|
||||
if (editor.settings.autosave_restore_when_empty !== false) {
|
||||
editor.on('init', function() {
|
||||
if (hasDraft() && isEmpty()) {
|
||||
restoreDraft();
|
||||
}
|
||||
});
|
||||
|
||||
editor.on('saveContent', function() {
|
||||
removeDraft();
|
||||
});
|
||||
}
|
||||
|
||||
window.onbeforeunload = tinymce._beforeUnloadHandler;
|
||||
|
||||
this.hasDraft = hasDraft;
|
||||
this.storeDraft = storeDraft;
|
||||
this.restoreDraft = restoreDraft;
|
||||
this.removeDraft = removeDraft;
|
||||
this.isEmpty = isEmpty;
|
||||
});
|
||||
}());
|
||||
})();
|
||||
|
||||
@@ -1 +1 @@
|
||||
tinymce._beforeUnloadHandler=function(){var a;return tinymce.each(tinymce.editors,function(b){b.plugins.autosave&&b.plugins.autosave.storeDraft(),!a&&b.isDirty()&&b.getParam("autosave_ask_before_unload",!0)&&(a=b.translate("You have unsaved changes are you sure you want to navigate away?"))}),a},tinymce.PluginManager.add("autosave",function(a){function b(a,b){var c={s:1e3,m:6e4};return a=/^(\d+)([ms]?)$/.exec(""+(a||b)),(a[2]?c[a[2]]:1)*parseInt(a,10)}function c(){var a=parseInt(n.getItem(k+"time"),10)||0;return(new Date).getTime()-a>m.autosave_retention?(d(!1),!1):!0}function d(b){n.removeItem(k+"draft"),n.removeItem(k+"time"),b!==!1&&a.fire("RemoveDraft")}function e(){!j()&&a.isDirty()&&(n.setItem(k+"draft",a.getContent({format:"raw",no_events:!0})),n.setItem(k+"time",(new Date).getTime()),a.fire("StoreDraft"))}function f(){c()&&(a.setContent(n.getItem(k+"draft"),{format:"raw"}),a.fire("RestoreDraft"))}function g(){l||(setInterval(function(){a.removed||e()},m.autosave_interval),l=!0)}function h(){var b=this;b.disabled(!c()),a.on("StoreDraft RestoreDraft RemoveDraft",function(){b.disabled(!c())}),g()}function i(){a.undoManager.beforeChange(),f(),d(),a.undoManager.add()}function j(b){var c=a.settings.forced_root_block;return b=tinymce.trim("undefined"==typeof b?a.getBody().innerHTML:b),""===b||new RegExp("^<"+c+"[^>]*>((\xa0| |[ ]|<br[^>]*>)+?|)</"+c+">|<br>$","i").test(b)}var k,l,m=a.settings,n=tinymce.util.LocalStorage;k=m.autosave_prefix||"tinymce-autosave-{path}{query}-{id}-",k=k.replace(/\{path\}/g,document.location.pathname),k=k.replace(/\{query\}/g,document.location.search),k=k.replace(/\{id\}/g,a.id),m.autosave_interval=b(m.autosave_interval,"30s"),m.autosave_retention=b(m.autosave_retention,"20m"),a.addButton("restoredraft",{title:"Restore last draft",onclick:i,onPostRender:h}),a.addMenuItem("restoredraft",{text:"Restore last draft",onclick:i,onPostRender:h,context:"file"}),a.settings.autosave_restore_when_empty!==!1&&(a.on("init",function(){c()&&j()&&f()}),a.on("saveContent",function(){d()})),window.onbeforeunload=tinymce._beforeUnloadHandler,this.hasDraft=c,this.storeDraft=e,this.restoreDraft=f,this.removeDraft=d,this.isEmpty=j});
|
||||
!function(){"use strict";var n=function(t){var e=t,r=function(){return e};return{get:r,set:function(t){e=t},clone:function(){return n(r())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),o=tinymce.util.Tools.resolve("tinymce.util.Tools"),r=function(t){return t.fire("RestoreDraft")},i=function(t){return t.fire("StoreDraft")},s=function(t){return t.fire("RemoveDraft")},e=function(t,e){return((t=/^(\d+)([ms]?)$/.exec(""+(t||e)))[2]?{s:1e3,m:6e4}[t[2]]:1)*parseInt(t,10)},u=function(t){return t.getParam("autosave_ask_before_unload",!0)},f=function(t){var e=t.getParam("autosave_prefix","tinymce-autosave-{path}{query}{hash}-{id}-");return e=(e=(e=(e=e.replace(/\{path\}/g,document.location.pathname)).replace(/\{query\}/g,document.location.search)).replace(/\{hash\}/g,document.location.hash)).replace(/\{id\}/g,t.id)},c=function(t){return e(t.settings.autosave_interval,"30s")},l=function(t){return e(t.settings.autosave_retention,"20m")},m=function(t,e){var r=t.settings.forced_root_block;return""===(e=o.trim(void 0===e?t.getBody().innerHTML:e))||new RegExp("^<"+r+"[^>]*>((\xa0| |[ \t]|<br[^>]*>)+?|)</"+r+">|<br>$","i").test(e)},v=function(t){var e=parseInt(a.getItem(f(t)+"time"),10)||0;return!((new Date).getTime()-e>l(t)&&(d(t,!1),1))},d=function(t,e){var r=f(t);a.removeItem(r+"draft"),a.removeItem(r+"time"),!1!==e&&s(t)},D=function(t){var e=f(t);!m(t)&&t.isDirty()&&(a.setItem(e+"draft",t.getContent({format:"raw",no_events:!0})),a.setItem(e+"time",(new Date).getTime().toString()),i(t))},g=function(t){var e=f(t);v(t)&&(t.setContent(a.getItem(e+"draft"),{format:"raw"}),r(t))},y={isEmpty:m,hasDraft:v,removeDraft:d,storeDraft:D,restoreDraft:g,startStoreDraft:function(t,e){var r=c(t);e.get()||(setInterval(function(){t.removed||D(t)},r),e.set(!0))},restoreLastDraft:function(t){t.undoManager.transact(function(){g(t),d(t)}),t.focus()}},p=function(e,r){return function(){var t=Array.prototype.slice.call(arguments);return e.apply(null,[r].concat(t))}},h=function(t){return{hasDraft:p(y.hasDraft,t),storeDraft:p(y.storeDraft,t),restoreDraft:p(y.restoreDraft,t),removeDraft:p(y.removeDraft,t),isEmpty:p(y.isEmpty,t)}},_=tinymce.util.Tools.resolve("tinymce.EditorManager");_._beforeUnloadHandler=function(){var e;return o.each(_.get(),function(t){t.plugins.autosave&&t.plugins.autosave.storeDraft(),!e&&t.isDirty()&&u(t)&&(e=t.translate("You have unsaved changes are you sure you want to navigate away?"))}),e};var b=function(t){window.onbeforeunload=_._beforeUnloadHandler},I=function(r,n){return function(t){var e=t.control;e.disabled(!y.hasDraft(r)),r.on("StoreDraft RestoreDraft RemoveDraft",function(){e.disabled(!y.hasDraft(r))}),y.startStoreDraft(r,n)}},w=function(t,e){t.addButton("restoredraft",{title:"Restore last draft",onclick:function(){y.restoreLastDraft(t)},onPostRender:I(t,e)}),t.addMenuItem("restoredraft",{text:"Restore last draft",onclick:function(){y.restoreLastDraft(t)},onPostRender:I(t,e),context:"file"})};t.add("autosave",function(t){var e=n(!1);return b(t),w(t,e),h(t)})}();
|
||||
@@ -0,0 +1,7 @@
|
||||
// Exports the "bbcode" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/bbcode')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/bbcode'
|
||||
require('./plugin.js');
|
||||
@@ -1,123 +1,101 @@
|
||||
/**
|
||||
* plugin.js
|
||||
*
|
||||
* Copyright, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
(function () {
|
||||
var bbcode = (function () {
|
||||
'use strict';
|
||||
|
||||
/*global tinymce:true */
|
||||
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
||||
|
||||
(function() {
|
||||
tinymce.create('tinymce.plugins.BBCodePlugin', {
|
||||
init: function(ed) {
|
||||
var self = this, dialect = ed.getParam('bbcode_dialect', 'punbb').toLowerCase();
|
||||
var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
||||
|
||||
ed.on('beforeSetContent', function(e) {
|
||||
e.content = self['_' + dialect + '_bbcode2html'](e.content);
|
||||
});
|
||||
var html2bbcode = function (s) {
|
||||
s = global$1.trim(s);
|
||||
var rep = function (re, str) {
|
||||
s = s.replace(re, str);
|
||||
};
|
||||
rep(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi, '[url=$1]$2[/url]');
|
||||
rep(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi, '[code][color=$1]$2[/color][/code]');
|
||||
rep(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi, '[quote][color=$1]$2[/color][/quote]');
|
||||
rep(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi, '[code][color=$1]$2[/color][/code]');
|
||||
rep(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi, '[quote][color=$1]$2[/color][/quote]');
|
||||
rep(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi, '[color=$1]$2[/color]');
|
||||
rep(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi, '[color=$1]$2[/color]');
|
||||
rep(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi, '[size=$1]$2[/size]');
|
||||
rep(/<font>(.*?)<\/font>/gi, '$1');
|
||||
rep(/<img.*?src=\"(.*?)\".*?\/>/gi, '[img]$1[/img]');
|
||||
rep(/<span class=\"codeStyle\">(.*?)<\/span>/gi, '[code]$1[/code]');
|
||||
rep(/<span class=\"quoteStyle\">(.*?)<\/span>/gi, '[quote]$1[/quote]');
|
||||
rep(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi, '[code][b]$1[/b][/code]');
|
||||
rep(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi, '[quote][b]$1[/b][/quote]');
|
||||
rep(/<em class=\"codeStyle\">(.*?)<\/em>/gi, '[code][i]$1[/i][/code]');
|
||||
rep(/<em class=\"quoteStyle\">(.*?)<\/em>/gi, '[quote][i]$1[/i][/quote]');
|
||||
rep(/<u class=\"codeStyle\">(.*?)<\/u>/gi, '[code][u]$1[/u][/code]');
|
||||
rep(/<u class=\"quoteStyle\">(.*?)<\/u>/gi, '[quote][u]$1[/u][/quote]');
|
||||
rep(/<\/(strong|b)>/gi, '[/b]');
|
||||
rep(/<(strong|b)>/gi, '[b]');
|
||||
rep(/<\/(em|i)>/gi, '[/i]');
|
||||
rep(/<(em|i)>/gi, '[i]');
|
||||
rep(/<\/u>/gi, '[/u]');
|
||||
rep(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi, '[u]$1[/u]');
|
||||
rep(/<u>/gi, '[u]');
|
||||
rep(/<blockquote[^>]*>/gi, '[quote]');
|
||||
rep(/<\/blockquote>/gi, '[/quote]');
|
||||
rep(/<br \/>/gi, '\n');
|
||||
rep(/<br\/>/gi, '\n');
|
||||
rep(/<br>/gi, '\n');
|
||||
rep(/<p>/gi, '');
|
||||
rep(/<\/p>/gi, '\n');
|
||||
rep(/ |\u00a0/gi, ' ');
|
||||
rep(/"/gi, '"');
|
||||
rep(/</gi, '<');
|
||||
rep(/>/gi, '>');
|
||||
rep(/&/gi, '&');
|
||||
return s;
|
||||
};
|
||||
var bbcode2html = function (s) {
|
||||
s = global$1.trim(s);
|
||||
var rep = function (re, str) {
|
||||
s = s.replace(re, str);
|
||||
};
|
||||
rep(/\n/gi, '<br />');
|
||||
rep(/\[b\]/gi, '<strong>');
|
||||
rep(/\[\/b\]/gi, '</strong>');
|
||||
rep(/\[i\]/gi, '<em>');
|
||||
rep(/\[\/i\]/gi, '</em>');
|
||||
rep(/\[u\]/gi, '<u>');
|
||||
rep(/\[\/u\]/gi, '</u>');
|
||||
rep(/\[url=([^\]]+)\](.*?)\[\/url\]/gi, '<a href="$1">$2</a>');
|
||||
rep(/\[url\](.*?)\[\/url\]/gi, '<a href="$1">$1</a>');
|
||||
rep(/\[img\](.*?)\[\/img\]/gi, '<img src="$1" />');
|
||||
rep(/\[color=(.*?)\](.*?)\[\/color\]/gi, '<font color="$1">$2</font>');
|
||||
rep(/\[code\](.*?)\[\/code\]/gi, '<span class="codeStyle">$1</span> ');
|
||||
rep(/\[quote.*?\](.*?)\[\/quote\]/gi, '<span class="quoteStyle">$1</span> ');
|
||||
return s;
|
||||
};
|
||||
var $_1c4yfk96jh8lpufd = {
|
||||
html2bbcode: html2bbcode,
|
||||
bbcode2html: bbcode2html
|
||||
};
|
||||
|
||||
ed.on('postProcess', function(e) {
|
||||
if (e.set) {
|
||||
e.content = self['_' + dialect + '_bbcode2html'](e.content);
|
||||
}
|
||||
global.add('bbcode', function () {
|
||||
return {
|
||||
init: function (editor) {
|
||||
editor.on('beforeSetContent', function (e) {
|
||||
e.content = $_1c4yfk96jh8lpufd.bbcode2html(e.content);
|
||||
});
|
||||
editor.on('postProcess', function (e) {
|
||||
if (e.set) {
|
||||
e.content = $_1c4yfk96jh8lpufd.bbcode2html(e.content);
|
||||
}
|
||||
if (e.get) {
|
||||
e.content = $_1c4yfk96jh8lpufd.html2bbcode(e.content);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
});
|
||||
function Plugin () {
|
||||
}
|
||||
|
||||
if (e.get) {
|
||||
e.content = self['_' + dialect + '_html2bbcode'](e.content);
|
||||
}
|
||||
});
|
||||
},
|
||||
return Plugin;
|
||||
|
||||
getInfo: function() {
|
||||
return {
|
||||
longname: 'BBCode Plugin',
|
||||
author: 'Moxiecode Systems AB',
|
||||
authorurl: 'http://www.tinymce.com',
|
||||
infourl: 'http://www.tinymce.com/wiki.php/Plugin:bbcode'
|
||||
};
|
||||
},
|
||||
|
||||
// Private methods
|
||||
|
||||
// HTML -> BBCode in PunBB dialect
|
||||
_punbb_html2bbcode: function(s) {
|
||||
s = tinymce.trim(s);
|
||||
|
||||
function rep(re, str) {
|
||||
s = s.replace(re, str);
|
||||
}
|
||||
|
||||
// example: <strong> to [b]
|
||||
rep(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi, "[url=$1]$2[/url]");
|
||||
rep(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi, "[code][color=$1]$2[/color][/code]");
|
||||
rep(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi, "[quote][color=$1]$2[/color][/quote]");
|
||||
rep(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi, "[code][color=$1]$2[/color][/code]");
|
||||
rep(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi, "[quote][color=$1]$2[/color][/quote]");
|
||||
rep(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi, "[color=$1]$2[/color]");
|
||||
rep(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi, "[color=$1]$2[/color]");
|
||||
rep(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi, "[size=$1]$2[/size]");
|
||||
rep(/<font>(.*?)<\/font>/gi, "$1");
|
||||
rep(/<img.*?src=\"(.*?)\".*?\/>/gi, "[img]$1[/img]");
|
||||
rep(/<span class=\"codeStyle\">(.*?)<\/span>/gi, "[code]$1[/code]");
|
||||
rep(/<span class=\"quoteStyle\">(.*?)<\/span>/gi, "[quote]$1[/quote]");
|
||||
rep(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi, "[code][b]$1[/b][/code]");
|
||||
rep(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi, "[quote][b]$1[/b][/quote]");
|
||||
rep(/<em class=\"codeStyle\">(.*?)<\/em>/gi, "[code][i]$1[/i][/code]");
|
||||
rep(/<em class=\"quoteStyle\">(.*?)<\/em>/gi, "[quote][i]$1[/i][/quote]");
|
||||
rep(/<u class=\"codeStyle\">(.*?)<\/u>/gi, "[code][u]$1[/u][/code]");
|
||||
rep(/<u class=\"quoteStyle\">(.*?)<\/u>/gi, "[quote][u]$1[/u][/quote]");
|
||||
rep(/<\/(strong|b)>/gi, "[/b]");
|
||||
rep(/<(strong|b)>/gi, "[b]");
|
||||
rep(/<\/(em|i)>/gi, "[/i]");
|
||||
rep(/<(em|i)>/gi, "[i]");
|
||||
rep(/<\/u>/gi, "[/u]");
|
||||
rep(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi, "[u]$1[/u]");
|
||||
rep(/<u>/gi, "[u]");
|
||||
rep(/<blockquote[^>]*>/gi, "[quote]");
|
||||
rep(/<\/blockquote>/gi, "[/quote]");
|
||||
rep(/<br \/>/gi, "\n");
|
||||
rep(/<br\/>/gi, "\n");
|
||||
rep(/<br>/gi, "\n");
|
||||
rep(/<p>/gi, "");
|
||||
rep(/<\/p>/gi, "\n");
|
||||
rep(/ |\u00a0/gi, " ");
|
||||
rep(/"/gi, "\"");
|
||||
rep(/</gi, "<");
|
||||
rep(/>/gi, ">");
|
||||
rep(/&/gi, "&");
|
||||
|
||||
return s;
|
||||
},
|
||||
|
||||
// BBCode -> HTML from PunBB dialect
|
||||
_punbb_bbcode2html: function(s) {
|
||||
s = tinymce.trim(s);
|
||||
|
||||
function rep(re, str) {
|
||||
s = s.replace(re, str);
|
||||
}
|
||||
|
||||
// example: [b] to <strong>
|
||||
rep(/\n/gi, "<br />");
|
||||
rep(/\[b\]/gi, "<strong>");
|
||||
rep(/\[\/b\]/gi, "</strong>");
|
||||
rep(/\[i\]/gi, "<em>");
|
||||
rep(/\[\/i\]/gi, "</em>");
|
||||
rep(/\[u\]/gi, "<u>");
|
||||
rep(/\[\/u\]/gi, "</u>");
|
||||
rep(/\[url=([^\]]+)\](.*?)\[\/url\]/gi, "<a href=\"$1\">$2</a>");
|
||||
rep(/\[url\](.*?)\[\/url\]/gi, "<a href=\"$1\">$1</a>");
|
||||
rep(/\[img\](.*?)\[\/img\]/gi, "<img src=\"$1\" />");
|
||||
rep(/\[color=(.*?)\](.*?)\[\/color\]/gi, "<font color=\"$1\">$2</font>");
|
||||
rep(/\[code\](.*?)\[\/code\]/gi, "<span class=\"codeStyle\">$1</span> ");
|
||||
rep(/\[quote.*?\](.*?)\[\/quote\]/gi, "<span class=\"quoteStyle\">$1</span> ");
|
||||
|
||||
return s;
|
||||
}
|
||||
});
|
||||
|
||||
// Register plugin
|
||||
tinymce.PluginManager.add('bbcode', tinymce.plugins.BBCodePlugin);
|
||||
})();
|
||||
}());
|
||||
})();
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
!function(){tinymce.create("tinymce.plugins.BBCodePlugin",{init:function(a){var b=this,c=a.getParam("bbcode_dialect","punbb").toLowerCase();a.on("beforeSetContent",function(a){a.content=b["_"+c+"_bbcode2html"](a.content)}),a.on("postProcess",function(a){a.set&&(a.content=b["_"+c+"_bbcode2html"](a.content)),a.get&&(a.content=b["_"+c+"_html2bbcode"](a.content))})},getInfo:function(){return{longname:"BBCode Plugin",author:"Moxiecode Systems AB",authorurl:"http://www.tinymce.com",infourl:"http://www.tinymce.com/wiki.php/Plugin:bbcode"}},_punbb_html2bbcode:function(a){function b(b,c){a=a.replace(b,c)}return a=tinymce.trim(a),b(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]"),b(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),b(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),b(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),b(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),b(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]"),b(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]"),b(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]"),b(/<font>(.*?)<\/font>/gi,"$1"),b(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]"),b(/<span class=\"codeStyle\">(.*?)<\/span>/gi,"[code]$1[/code]"),b(/<span class=\"quoteStyle\">(.*?)<\/span>/gi,"[quote]$1[/quote]"),b(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"),b(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"),b(/<em class=\"codeStyle\">(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"),b(/<em class=\"quoteStyle\">(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"),b(/<u class=\"codeStyle\">(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"),b(/<u class=\"quoteStyle\">(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"),b(/<\/(strong|b)>/gi,"[/b]"),b(/<(strong|b)>/gi,"[b]"),b(/<\/(em|i)>/gi,"[/i]"),b(/<(em|i)>/gi,"[i]"),b(/<\/u>/gi,"[/u]"),b(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]"),b(/<u>/gi,"[u]"),b(/<blockquote[^>]*>/gi,"[quote]"),b(/<\/blockquote>/gi,"[/quote]"),b(/<br \/>/gi,"\n"),b(/<br\/>/gi,"\n"),b(/<br>/gi,"\n"),b(/<p>/gi,""),b(/<\/p>/gi,"\n"),b(/ |\u00a0/gi," "),b(/"/gi,'"'),b(/</gi,"<"),b(/>/gi,">"),b(/&/gi,"&"),a},_punbb_bbcode2html:function(a){function b(b,c){a=a.replace(b,c)}return a=tinymce.trim(a),b(/\n/gi,"<br />"),b(/\[b\]/gi,"<strong>"),b(/\[\/b\]/gi,"</strong>"),b(/\[i\]/gi,"<em>"),b(/\[\/i\]/gi,"</em>"),b(/\[u\]/gi,"<u>"),b(/\[\/u\]/gi,"</u>"),b(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'<a href="$1">$2</a>'),b(/\[url\](.*?)\[\/url\]/gi,'<a href="$1">$1</a>'),b(/\[img\](.*?)\[\/img\]/gi,'<img src="$1" />'),b(/\[color=(.*?)\](.*?)\[\/color\]/gi,'<font color="$1">$2</font>'),b(/\[code\](.*?)\[\/code\]/gi,'<span class="codeStyle">$1</span> '),b(/\[quote.*?\](.*?)\[\/quote\]/gi,'<span class="quoteStyle">$1</span> '),a}}),tinymce.PluginManager.add("bbcode",tinymce.plugins.BBCodePlugin)}();
|
||||
!function(){"use strict";var o=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.util.Tools"),e=function(e){e=t.trim(e);var o=function(o,t){e=e.replace(o,t)};return o(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]"),o(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),o(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),o(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),o(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),o(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]"),o(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]"),o(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]"),o(/<font>(.*?)<\/font>/gi,"$1"),o(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]"),o(/<span class=\"codeStyle\">(.*?)<\/span>/gi,"[code]$1[/code]"),o(/<span class=\"quoteStyle\">(.*?)<\/span>/gi,"[quote]$1[/quote]"),o(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"),o(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"),o(/<em class=\"codeStyle\">(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"),o(/<em class=\"quoteStyle\">(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"),o(/<u class=\"codeStyle\">(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"),o(/<u class=\"quoteStyle\">(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"),o(/<\/(strong|b)>/gi,"[/b]"),o(/<(strong|b)>/gi,"[b]"),o(/<\/(em|i)>/gi,"[/i]"),o(/<(em|i)>/gi,"[i]"),o(/<\/u>/gi,"[/u]"),o(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]"),o(/<u>/gi,"[u]"),o(/<blockquote[^>]*>/gi,"[quote]"),o(/<\/blockquote>/gi,"[/quote]"),o(/<br \/>/gi,"\n"),o(/<br\/>/gi,"\n"),o(/<br>/gi,"\n"),o(/<p>/gi,""),o(/<\/p>/gi,"\n"),o(/ |\u00a0/gi," "),o(/"/gi,'"'),o(/</gi,"<"),o(/>/gi,">"),o(/&/gi,"&"),e},i=function(e){e=t.trim(e);var o=function(o,t){e=e.replace(o,t)};return o(/\n/gi,"<br />"),o(/\[b\]/gi,"<strong>"),o(/\[\/b\]/gi,"</strong>"),o(/\[i\]/gi,"<em>"),o(/\[\/i\]/gi,"</em>"),o(/\[u\]/gi,"<u>"),o(/\[\/u\]/gi,"</u>"),o(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'<a href="$1">$2</a>'),o(/\[url\](.*?)\[\/url\]/gi,'<a href="$1">$1</a>'),o(/\[img\](.*?)\[\/img\]/gi,'<img src="$1" />'),o(/\[color=(.*?)\](.*?)\[\/color\]/gi,'<font color="$1">$2</font>'),o(/\[code\](.*?)\[\/code\]/gi,'<span class="codeStyle">$1</span> '),o(/\[quote.*?\](.*?)\[\/quote\]/gi,'<span class="quoteStyle">$1</span> '),e};o.add("bbcode",function(){return{init:function(o){o.on("beforeSetContent",function(o){o.content=i(o.content)}),o.on("postProcess",function(o){o.set&&(o.content=i(o.content)),o.get&&(o.content=e(o.content))})}}})}();
|
||||
@@ -0,0 +1,7 @@
|
||||
// Exports the "charmap" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/charmap')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/charmap'
|
||||
require('./plugin.js');
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -0,0 +1,7 @@
|
||||
// Exports the "code" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/code')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/code'
|
||||
require('./plugin.js');
|
||||
@@ -1,60 +1,94 @@
|
||||
/**
|
||||
* plugin.js
|
||||
*
|
||||
* Copyright, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
(function () {
|
||||
var code = (function () {
|
||||
'use strict';
|
||||
|
||||
/*global tinymce:true */
|
||||
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
||||
|
||||
tinymce.PluginManager.add('code', function(editor) {
|
||||
function showDialog() {
|
||||
var win = editor.windowManager.open({
|
||||
title: "Source code",
|
||||
body: {
|
||||
type: 'textbox',
|
||||
name: 'code',
|
||||
multiline: true,
|
||||
minWidth: editor.getParam("code_dialog_width", 600),
|
||||
minHeight: editor.getParam("code_dialog_height", Math.min(tinymce.DOM.getViewPort().h - 200, 500)),
|
||||
spellcheck: false,
|
||||
style: 'direction: ltr; text-align: left'
|
||||
},
|
||||
onSubmit: function(e) {
|
||||
// We get a lovely "Wrong document" error in IE 11 if we
|
||||
// don't move the focus to the editor before creating an undo
|
||||
// transation since it tries to make a bookmark for the current selection
|
||||
editor.focus();
|
||||
var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
|
||||
|
||||
editor.undoManager.transact(function() {
|
||||
editor.setContent(e.data.code);
|
||||
});
|
||||
var getMinWidth = function (editor) {
|
||||
return editor.getParam('code_dialog_width', 600);
|
||||
};
|
||||
var getMinHeight = function (editor) {
|
||||
return editor.getParam('code_dialog_height', Math.min(global$1.DOM.getViewPort().h - 200, 500));
|
||||
};
|
||||
var $_7a5bps9ojh8lpugv = {
|
||||
getMinWidth: getMinWidth,
|
||||
getMinHeight: getMinHeight
|
||||
};
|
||||
|
||||
editor.selection.setCursorLocation();
|
||||
editor.nodeChanged();
|
||||
}
|
||||
});
|
||||
var setContent = function (editor, html) {
|
||||
editor.focus();
|
||||
editor.undoManager.transact(function () {
|
||||
editor.setContent(html);
|
||||
});
|
||||
editor.selection.setCursorLocation();
|
||||
editor.nodeChanged();
|
||||
};
|
||||
var getContent = function (editor) {
|
||||
return editor.getContent({ source_view: true });
|
||||
};
|
||||
var $_4f0hos9qjh8lpugw = {
|
||||
setContent: setContent,
|
||||
getContent: getContent
|
||||
};
|
||||
|
||||
// Gecko has a major performance issue with textarea
|
||||
// contents so we need to set it when all reflows are done
|
||||
win.find('#code').value(editor.getContent({source_view: true}));
|
||||
}
|
||||
var open = function (editor) {
|
||||
var minWidth = $_7a5bps9ojh8lpugv.getMinWidth(editor);
|
||||
var minHeight = $_7a5bps9ojh8lpugv.getMinHeight(editor);
|
||||
var win = editor.windowManager.open({
|
||||
title: 'Source code',
|
||||
body: {
|
||||
type: 'textbox',
|
||||
name: 'code',
|
||||
multiline: true,
|
||||
minWidth: minWidth,
|
||||
minHeight: minHeight,
|
||||
spellcheck: false,
|
||||
style: 'direction: ltr; text-align: left'
|
||||
},
|
||||
onSubmit: function (e) {
|
||||
$_4f0hos9qjh8lpugw.setContent(editor, e.data.code);
|
||||
}
|
||||
});
|
||||
win.find('#code').value($_4f0hos9qjh8lpugw.getContent(editor));
|
||||
};
|
||||
var $_8t2ji69njh8lpugu = { open: open };
|
||||
|
||||
editor.addCommand("mceCodeEditor", showDialog);
|
||||
var register = function (editor) {
|
||||
editor.addCommand('mceCodeEditor', function () {
|
||||
$_8t2ji69njh8lpugu.open(editor);
|
||||
});
|
||||
};
|
||||
var $_1cb0ek9mjh8lpugt = { register: register };
|
||||
|
||||
editor.addButton('code', {
|
||||
icon: 'code',
|
||||
tooltip: 'Source code',
|
||||
onclick: showDialog
|
||||
});
|
||||
var register$1 = function (editor) {
|
||||
editor.addButton('code', {
|
||||
icon: 'code',
|
||||
tooltip: 'Source code',
|
||||
onclick: function () {
|
||||
$_8t2ji69njh8lpugu.open(editor);
|
||||
}
|
||||
});
|
||||
editor.addMenuItem('code', {
|
||||
icon: 'code',
|
||||
text: 'Source code',
|
||||
onclick: function () {
|
||||
$_8t2ji69njh8lpugu.open(editor);
|
||||
}
|
||||
});
|
||||
};
|
||||
var $_aziuou9rjh8lpugx = { register: register$1 };
|
||||
|
||||
editor.addMenuItem('code', {
|
||||
icon: 'code',
|
||||
text: 'Source code',
|
||||
context: 'tools',
|
||||
onclick: showDialog
|
||||
});
|
||||
});
|
||||
global.add('code', function (editor) {
|
||||
$_1cb0ek9mjh8lpugt.register(editor);
|
||||
$_aziuou9rjh8lpugx.register(editor);
|
||||
return {};
|
||||
});
|
||||
function Plugin () {
|
||||
}
|
||||
|
||||
return Plugin;
|
||||
|
||||
}());
|
||||
})();
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
tinymce.PluginManager.add("code",function(a){function b(){var b=a.windowManager.open({title:"Source code",body:{type:"textbox",name:"code",multiline:!0,minWidth:a.getParam("code_dialog_width",600),minHeight:a.getParam("code_dialog_height",Math.min(tinymce.DOM.getViewPort().h-200,500)),spellcheck:!1,style:"direction: ltr; text-align: left"},onSubmit:function(b){a.focus(),a.undoManager.transact(function(){a.setContent(b.data.code)}),a.selection.setCursorLocation(),a.nodeChanged()}});b.find("#code").value(a.getContent({source_view:!0}))}a.addCommand("mceCodeEditor",b),a.addButton("code",{icon:"code",tooltip:"Source code",onclick:b}),a.addMenuItem("code",{icon:"code",text:"Source code",context:"tools",onclick:b})});
|
||||
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),o=function(t){return t.getParam("code_dialog_width",600)},i=function(t){return t.getParam("code_dialog_height",Math.min(n.DOM.getViewPort().h-200,500))},c=function(t,n){t.focus(),t.undoManager.transact(function(){t.setContent(n)}),t.selection.setCursorLocation(),t.nodeChanged()},d=function(t){return t.getContent({source_view:!0})},e=function(n){var t=o(n),e=i(n);n.windowManager.open({title:"Source code",body:{type:"textbox",name:"code",multiline:!0,minWidth:t,minHeight:e,spellcheck:!1,style:"direction: ltr; text-align: left"},onSubmit:function(t){c(n,t.data.code)}}).find("#code").value(d(n))},u=function(t){t.addCommand("mceCodeEditor",function(){e(t)})},a=function(t){t.addButton("code",{icon:"code",tooltip:"Source code",onclick:function(){e(t)}}),t.addMenuItem("code",{icon:"code",text:"Source code",onclick:function(){e(t)}})};t.add("code",function(t){return u(t),a(t),{}})}();
|
||||
@@ -0,0 +1,8 @@
|
||||
tinymce.addI18n('en',{
|
||||
'HTML source code': 'HTML source code',
|
||||
'Start search': 'Start search',
|
||||
'Find next': 'Find next',
|
||||
'Find previous': 'Find previous',
|
||||
'Replace': 'Replace',
|
||||
'Replace all': 'Replace all'
|
||||
});
|
||||
@@ -0,0 +1,8 @@
|
||||
tinymce.addI18n('en',{
|
||||
'HTML source code': 'HTML source code',
|
||||
'Start search': 'Start search',
|
||||
'Find next': 'Find next',
|
||||
'Find previous': 'Find previous',
|
||||
'Replace': 'Replace',
|
||||
'Replace all': 'Replace all'
|
||||
});
|
||||
@@ -0,0 +1,8 @@
|
||||
tinymce.addI18n('en',{
|
||||
'HTML source code': 'HTML source code',
|
||||
'Start search': 'Start search',
|
||||
'Find next': 'Find next',
|
||||
'Find previous': 'Find previous',
|
||||
'Replace': 'Replace',
|
||||
'Replace all': 'Replace all'
|
||||
});
|
||||
@@ -0,0 +1,8 @@
|
||||
tinymce.addI18n('en',{
|
||||
'HTML source code': 'HTML source code',
|
||||
'Start search': 'Start search',
|
||||
'Find next': 'Find next',
|
||||
'Find previous': 'Find previous',
|
||||
'Replace': 'Replace',
|
||||
'Replace all': 'Replace all'
|
||||
});
|
||||
@@ -0,0 +1,8 @@
|
||||
tinymce.addI18n('en',{
|
||||
'HTML source code': 'HTML source code',
|
||||
'Start search': 'Start search',
|
||||
'Find next': 'Find next',
|
||||
'Find previous': 'Find previous',
|
||||
'Replace': 'Replace',
|
||||
'Replace all': 'Replace all'
|
||||
});
|
||||
@@ -0,0 +1,8 @@
|
||||
tinymce.addI18n('en',{
|
||||
'HTML source code': 'HTML source code',
|
||||
'Start search': 'Start search',
|
||||
'Find next': 'Find next',
|
||||
'Find previous': 'Find previous',
|
||||
'Replace': 'Replace',
|
||||
'Replace all': 'Replace all'
|
||||
});
|
||||
@@ -0,0 +1,8 @@
|
||||
tinymce.addI18n('en',{
|
||||
'HTML source code': 'HTML source code',
|
||||
'Start search': 'Start search',
|
||||
'Find next': 'Find next',
|
||||
'Find previous': 'Find previous',
|
||||
'Replace': 'Replace',
|
||||
'Replace all': 'Replace all'
|
||||
});
|
||||
@@ -0,0 +1,8 @@
|
||||
tinymce.addI18n('en',{
|
||||
'HTML source code': 'HTML source code',
|
||||
'Start search': 'Start search',
|
||||
'Find next': 'Find next',
|
||||
'Find previous': 'Find previous',
|
||||
'Replace': 'Replace',
|
||||
'Replace all': 'Replace all'
|
||||
});
|
||||
@@ -0,0 +1,8 @@
|
||||
tinymce.addI18n('en',{
|
||||
'HTML source code': 'HTML source code',
|
||||
'Start search': 'Start search',
|
||||
'Find next': 'Find next',
|
||||
'Find previous': 'Find previous',
|
||||
'Replace': 'Replace',
|
||||
'Replace all': 'Replace all'
|
||||
});
|
||||
@@ -0,0 +1,8 @@
|
||||
tinymce.addI18n('en',{
|
||||
'HTML source code': 'HTML source code',
|
||||
'Start search': 'Start search',
|
||||
'Find next': 'Find next',
|
||||
'Find previous': 'Find previous',
|
||||
'Replace': 'Replace',
|
||||
'Replace all': 'Replace all'
|
||||
});
|
||||
@@ -0,0 +1,8 @@
|
||||
tinymce.addI18n('en',{
|
||||
'HTML source code': 'HTML source code',
|
||||
'Start search': 'Start search',
|
||||
'Find next': 'Find next',
|
||||
'Find previous': 'Find previous',
|
||||
'Replace': 'Replace',
|
||||
'Replace all': 'Replace all'
|
||||
});
|
||||
@@ -0,0 +1,8 @@
|
||||
tinymce.addI18n('en',{
|
||||
'HTML source code': 'HTML source code',
|
||||
'Start search': 'Start search',
|
||||
'Find next': 'Find next',
|
||||
'Find previous': 'Find previous',
|
||||
'Replace': 'Replace',
|
||||
'Replace all': 'Replace all'
|
||||
});
|
||||
@@ -0,0 +1,8 @@
|
||||
tinymce.addI18n('en',{
|
||||
'HTML source code': 'HTML source code',
|
||||
'Start search': 'Start search',
|
||||
'Find next': 'Find next',
|
||||
'Find previous': 'Find previous',
|
||||
'Replace': 'Replace',
|
||||
'Replace all': 'Replace all'
|
||||
});
|
||||
@@ -0,0 +1,8 @@
|
||||
tinymce.addI18n('en',{
|
||||
'HTML source code': 'HTML source code',
|
||||
'Start search': 'Start search',
|
||||
'Find next': 'Find next',
|
||||
'Find previous': 'Find previous',
|
||||
'Replace': 'Replace',
|
||||
'Replace all': 'Replace all'
|
||||
});
|
||||
@@ -0,0 +1,8 @@
|
||||
tinymce.addI18n('en',{
|
||||
'HTML source code': 'HTML source code',
|
||||
'Start search': 'Start search',
|
||||
'Find next': 'Find next',
|
||||
'Find previous': 'Find previous',
|
||||
'Replace': 'Replace',
|
||||
'Replace all': 'Replace all'
|
||||
});
|
||||
@@ -0,0 +1,138 @@
|
||||
/* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript */
|
||||
/**
|
||||
* prism.js default theme for JavaScript, CSS and HTML
|
||||
* Based on dabblet (http://dabblet.com)
|
||||
* @author Lea Verou
|
||||
*/
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
color: black;
|
||||
text-shadow: 0 1px white;
|
||||
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
||||
direction: ltr;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
word-wrap: normal;
|
||||
line-height: 1.5;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
|
||||
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
|
||||
text-shadow: none;
|
||||
background: #b3d4fc;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
|
||||
code[class*="language-"]::selection, code[class*="language-"] ::selection {
|
||||
text-shadow: none;
|
||||
background: #b3d4fc;
|
||||
}
|
||||
|
||||
@media print {
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
text-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
:not(pre) > code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
background: #f5f2f0;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: .1em;
|
||||
border-radius: .3em;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: slategray;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.tag,
|
||||
.token.boolean,
|
||||
.token.number,
|
||||
.token.constant,
|
||||
.token.symbol,
|
||||
.token.deleted {
|
||||
color: #905;
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
.token.attr-name,
|
||||
.token.string,
|
||||
.token.char,
|
||||
.token.builtin,
|
||||
.token.inserted {
|
||||
color: #690;
|
||||
}
|
||||
|
||||
.token.operator,
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.language-css .token.string,
|
||||
.style .token.string {
|
||||
color: #a67f59;
|
||||
background: hsla(0, 0%, 100%, .5);
|
||||
}
|
||||
|
||||
.token.atrule,
|
||||
.token.attr-value,
|
||||
.token.keyword {
|
||||
color: #07a;
|
||||
}
|
||||
|
||||
.token.function {
|
||||
color: #DD4A68;
|
||||
}
|
||||
|
||||
.token.regex,
|
||||
.token.important,
|
||||
.token.variable {
|
||||
color: #e90;
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
// Exports the "codesample" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/codesample')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/codesample'
|
||||
require('./plugin.js');
|
||||
@@ -0,0 +1,967 @@
|
||||
(function () {
|
||||
var codesample = (function () {
|
||||
'use strict';
|
||||
|
||||
var Cell = function (initial) {
|
||||
var value = initial;
|
||||
var get = function () {
|
||||
return value;
|
||||
};
|
||||
var set = function (v) {
|
||||
value = v;
|
||||
};
|
||||
var clone = function () {
|
||||
return Cell(get());
|
||||
};
|
||||
return {
|
||||
get: get,
|
||||
set: set,
|
||||
clone: clone
|
||||
};
|
||||
};
|
||||
|
||||
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
||||
|
||||
var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
|
||||
|
||||
var getContentCss = function (editor) {
|
||||
return editor.settings.codesample_content_css;
|
||||
};
|
||||
var getLanguages = function (editor) {
|
||||
return editor.settings.codesample_languages;
|
||||
};
|
||||
var getDialogMinWidth = function (editor) {
|
||||
return Math.min(global$1.DOM.getViewPort().w, editor.getParam('codesample_dialog_width', 800));
|
||||
};
|
||||
var getDialogMinHeight = function (editor) {
|
||||
return Math.min(global$1.DOM.getViewPort().w, editor.getParam('codesample_dialog_height', 650));
|
||||
};
|
||||
var $_3ew0z79xjh8lpuhi = {
|
||||
getContentCss: getContentCss,
|
||||
getLanguages: getLanguages,
|
||||
getDialogMinWidth: getDialogMinWidth,
|
||||
getDialogMinHeight: getDialogMinHeight
|
||||
};
|
||||
|
||||
var window = {};
|
||||
var global$2 = window;
|
||||
var _self = typeof window !== 'undefined' ? window : typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope ? self : {};
|
||||
var Prism = function () {
|
||||
var lang = /\blang(?:uage)?-(?!\*)(\w+)\b/i;
|
||||
var _ = _self.Prism = {
|
||||
util: {
|
||||
encode: function (tokens) {
|
||||
if (tokens instanceof Token) {
|
||||
return new Token(tokens.type, _.util.encode(tokens.content), tokens.alias);
|
||||
} else if (_.util.type(tokens) === 'Array') {
|
||||
return tokens.map(_.util.encode);
|
||||
} else {
|
||||
return tokens.replace(/&/g, '&').replace(/</g, '<').replace(/\u00a0/g, ' ');
|
||||
}
|
||||
},
|
||||
type: function (o) {
|
||||
return Object.prototype.toString.call(o).match(/\[object (\w+)\]/)[1];
|
||||
},
|
||||
clone: function (o) {
|
||||
var type = _.util.type(o);
|
||||
switch (type) {
|
||||
case 'Object':
|
||||
var clone = {};
|
||||
for (var key in o) {
|
||||
if (o.hasOwnProperty(key)) {
|
||||
clone[key] = _.util.clone(o[key]);
|
||||
}
|
||||
}
|
||||
return clone;
|
||||
case 'Array':
|
||||
return o.map && o.map(function (v) {
|
||||
return _.util.clone(v);
|
||||
});
|
||||
}
|
||||
return o;
|
||||
}
|
||||
},
|
||||
languages: {
|
||||
extend: function (id, redef) {
|
||||
var lang = _.util.clone(_.languages[id]);
|
||||
for (var key in redef) {
|
||||
lang[key] = redef[key];
|
||||
}
|
||||
return lang;
|
||||
},
|
||||
insertBefore: function (inside, before, insert, root) {
|
||||
root = root || _.languages;
|
||||
var grammar = root[inside];
|
||||
if (arguments.length === 2) {
|
||||
insert = arguments[1];
|
||||
for (var newToken in insert) {
|
||||
if (insert.hasOwnProperty(newToken)) {
|
||||
grammar[newToken] = insert[newToken];
|
||||
}
|
||||
}
|
||||
return grammar;
|
||||
}
|
||||
var ret = {};
|
||||
for (var token in grammar) {
|
||||
if (grammar.hasOwnProperty(token)) {
|
||||
if (token === before) {
|
||||
for (var newToken in insert) {
|
||||
if (insert.hasOwnProperty(newToken)) {
|
||||
ret[newToken] = insert[newToken];
|
||||
}
|
||||
}
|
||||
}
|
||||
ret[token] = grammar[token];
|
||||
}
|
||||
}
|
||||
_.languages.DFS(_.languages, function (key, value) {
|
||||
if (value === root[inside] && key !== inside) {
|
||||
this[key] = ret;
|
||||
}
|
||||
});
|
||||
return root[inside] = ret;
|
||||
},
|
||||
DFS: function (o, callback, type) {
|
||||
for (var i in o) {
|
||||
if (o.hasOwnProperty(i)) {
|
||||
callback.call(o, i, o[i], type || i);
|
||||
if (_.util.type(o[i]) === 'Object') {
|
||||
_.languages.DFS(o[i], callback);
|
||||
} else if (_.util.type(o[i]) === 'Array') {
|
||||
_.languages.DFS(o[i], callback, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
plugins: {},
|
||||
highlightAll: function (async, callback) {
|
||||
var elements = document.querySelectorAll('code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code');
|
||||
for (var i = 0, element = void 0; element = elements[i++];) {
|
||||
_.highlightElement(element, async === true, callback);
|
||||
}
|
||||
},
|
||||
highlightElement: function (element, async, callback) {
|
||||
var language, grammar, parent = element;
|
||||
while (parent && !lang.test(parent.className)) {
|
||||
parent = parent.parentNode;
|
||||
}
|
||||
if (parent) {
|
||||
language = (parent.className.match(lang) || [
|
||||
,
|
||||
''
|
||||
])[1];
|
||||
grammar = _.languages[language];
|
||||
}
|
||||
element.className = element.className.replace(lang, '').replace(/\s+/g, ' ') + ' language-' + language;
|
||||
parent = element.parentNode;
|
||||
if (/pre/i.test(parent.nodeName)) {
|
||||
parent.className = parent.className.replace(lang, '').replace(/\s+/g, ' ') + ' language-' + language;
|
||||
}
|
||||
var code = element.textContent;
|
||||
var env = {
|
||||
element: element,
|
||||
language: language,
|
||||
grammar: grammar,
|
||||
code: code
|
||||
};
|
||||
if (!code || !grammar) {
|
||||
_.hooks.run('complete', env);
|
||||
return;
|
||||
}
|
||||
_.hooks.run('before-highlight', env);
|
||||
if (async && _self.Worker) {
|
||||
var worker = new Worker(_.filename);
|
||||
worker.onmessage = function (evt) {
|
||||
env.highlightedCode = evt.data;
|
||||
_.hooks.run('before-insert', env);
|
||||
env.element.innerHTML = env.highlightedCode;
|
||||
if (callback) {
|
||||
callback.call(env.element);
|
||||
}
|
||||
_.hooks.run('after-highlight', env);
|
||||
_.hooks.run('complete', env);
|
||||
};
|
||||
worker.postMessage(JSON.stringify({
|
||||
language: env.language,
|
||||
code: env.code,
|
||||
immediateClose: true
|
||||
}));
|
||||
} else {
|
||||
env.highlightedCode = _.highlight(env.code, env.grammar, env.language);
|
||||
_.hooks.run('before-insert', env);
|
||||
env.element.innerHTML = env.highlightedCode;
|
||||
if (callback) {
|
||||
callback.call(element);
|
||||
}
|
||||
_.hooks.run('after-highlight', env);
|
||||
_.hooks.run('complete', env);
|
||||
}
|
||||
},
|
||||
highlight: function (text, grammar, language) {
|
||||
var tokens = _.tokenize(text, grammar);
|
||||
return Token.stringify(_.util.encode(tokens), language);
|
||||
},
|
||||
tokenize: function (text, grammar, language) {
|
||||
var Token = _.Token;
|
||||
var strarr = [text];
|
||||
var rest = grammar.rest;
|
||||
if (rest) {
|
||||
for (var token in rest) {
|
||||
grammar[token] = rest[token];
|
||||
}
|
||||
delete grammar.rest;
|
||||
}
|
||||
tokenloop:
|
||||
for (var token in grammar) {
|
||||
if (!grammar.hasOwnProperty(token) || !grammar[token]) {
|
||||
continue;
|
||||
}
|
||||
var patterns = grammar[token];
|
||||
patterns = _.util.type(patterns) === 'Array' ? patterns : [patterns];
|
||||
for (var j = 0; j < patterns.length; ++j) {
|
||||
var pattern = patterns[j];
|
||||
var inside = pattern.inside;
|
||||
var lookbehind = !!pattern.lookbehind;
|
||||
var lookbehindLength = 0;
|
||||
var alias = pattern.alias;
|
||||
pattern = pattern.pattern || pattern;
|
||||
for (var i = 0; i < strarr.length; i++) {
|
||||
var str = strarr[i];
|
||||
if (strarr.length > text.length) {
|
||||
break tokenloop;
|
||||
}
|
||||
if (str instanceof Token) {
|
||||
continue;
|
||||
}
|
||||
pattern.lastIndex = 0;
|
||||
var match = pattern.exec(str);
|
||||
if (match) {
|
||||
if (lookbehind) {
|
||||
lookbehindLength = match[1].length;
|
||||
}
|
||||
var from = match.index - 1 + lookbehindLength;
|
||||
match = match[0].slice(lookbehindLength);
|
||||
var len = match.length, to = from + len, before = str.slice(0, from + 1), after = str.slice(to + 1);
|
||||
var args = [
|
||||
i,
|
||||
1
|
||||
];
|
||||
if (before) {
|
||||
args.push(before);
|
||||
}
|
||||
var wrapped = new Token(token, inside ? _.tokenize(match, inside) : match, alias);
|
||||
args.push(wrapped);
|
||||
if (after) {
|
||||
args.push(after);
|
||||
}
|
||||
Array.prototype.splice.apply(strarr, args);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return strarr;
|
||||
},
|
||||
hooks: {
|
||||
all: {},
|
||||
add: function (name, callback) {
|
||||
var hooks = _.hooks.all;
|
||||
hooks[name] = hooks[name] || [];
|
||||
hooks[name].push(callback);
|
||||
},
|
||||
run: function (name, env) {
|
||||
var callbacks = _.hooks.all[name];
|
||||
if (!callbacks || !callbacks.length) {
|
||||
return;
|
||||
}
|
||||
for (var i = 0, callback = void 0; callback = callbacks[i++];) {
|
||||
callback(env);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
var Token = _.Token = function (type, content, alias) {
|
||||
this.type = type;
|
||||
this.content = content;
|
||||
this.alias = alias;
|
||||
};
|
||||
Token.stringify = function (o, language, parent) {
|
||||
if (typeof o === 'string') {
|
||||
return o;
|
||||
}
|
||||
if (_.util.type(o) === 'Array') {
|
||||
return o.map(function (element) {
|
||||
return Token.stringify(element, language, o);
|
||||
}).join('');
|
||||
}
|
||||
var env = {
|
||||
type: o.type,
|
||||
content: Token.stringify(o.content, language, parent),
|
||||
tag: 'span',
|
||||
classes: [
|
||||
'token',
|
||||
o.type
|
||||
],
|
||||
attributes: {},
|
||||
language: language,
|
||||
parent: parent
|
||||
};
|
||||
if (env.type === 'comment') {
|
||||
env.attributes.spellcheck = 'true';
|
||||
}
|
||||
if (o.alias) {
|
||||
var aliases = _.util.type(o.alias) === 'Array' ? o.alias : [o.alias];
|
||||
Array.prototype.push.apply(env.classes, aliases);
|
||||
}
|
||||
_.hooks.run('wrap', env);
|
||||
var attributes = '';
|
||||
for (var name_1 in env.attributes) {
|
||||
attributes += (attributes ? ' ' : '') + name_1 + '="' + (env.attributes[name_1] || '') + '"';
|
||||
}
|
||||
return '<' + env.tag + ' class="' + env.classes.join(' ') + '" ' + attributes + '>' + env.content + '</' + env.tag + '>';
|
||||
};
|
||||
if (!_self.document) {
|
||||
if (!_self.addEventListener) {
|
||||
return _self.Prism;
|
||||
}
|
||||
_self.addEventListener('message', function (evt) {
|
||||
var message = JSON.parse(evt.data), lang = message.language, code = message.code, immediateClose = message.immediateClose;
|
||||
_self.postMessage(_.highlight(code, _.languages[lang], lang));
|
||||
if (immediateClose) {
|
||||
_self.close();
|
||||
}
|
||||
}, false);
|
||||
return _self.Prism;
|
||||
}
|
||||
}();
|
||||
if (typeof global$2 !== 'undefined') {
|
||||
global$2.Prism = Prism;
|
||||
}
|
||||
Prism.languages.markup = {
|
||||
comment: /<!--[\w\W]*?-->/,
|
||||
prolog: /<\?[\w\W]+?\?>/,
|
||||
doctype: /<!DOCTYPE[\w\W]+?>/,
|
||||
cdata: /<!\[CDATA\[[\w\W]*?]]>/i,
|
||||
tag: {
|
||||
pattern: /<\/?[^\s>\/=.]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i,
|
||||
inside: {
|
||||
'tag': {
|
||||
pattern: /^<\/?[^\s>\/]+/i,
|
||||
inside: {
|
||||
punctuation: /^<\/?/,
|
||||
namespace: /^[^\s>\/:]+:/
|
||||
}
|
||||
},
|
||||
'attr-value': {
|
||||
pattern: /=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i,
|
||||
inside: { punctuation: /[=>"']/ }
|
||||
},
|
||||
'punctuation': /\/?>/,
|
||||
'attr-name': {
|
||||
pattern: /[^\s>\/]+/,
|
||||
inside: { namespace: /^[^\s>\/:]+:/ }
|
||||
}
|
||||
}
|
||||
},
|
||||
entity: /&#?[\da-z]{1,8};/i
|
||||
};
|
||||
Prism.hooks.add('wrap', function (env) {
|
||||
if (env.type === 'entity') {
|
||||
env.attributes.title = env.content.replace(/&/, '&');
|
||||
}
|
||||
});
|
||||
Prism.languages.xml = Prism.languages.markup;
|
||||
Prism.languages.html = Prism.languages.markup;
|
||||
Prism.languages.mathml = Prism.languages.markup;
|
||||
Prism.languages.svg = Prism.languages.markup;
|
||||
Prism.languages.css = {
|
||||
comment: /\/\*[\w\W]*?\*\//,
|
||||
atrule: {
|
||||
pattern: /@[\w-]+?.*?(;|(?=\s*\{))/i,
|
||||
inside: { rule: /@[\w-]+/ }
|
||||
},
|
||||
url: /url\((?:(["'])(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,
|
||||
selector: /[^\{\}\s][^\{\};]*?(?=\s*\{)/,
|
||||
string: /("|')(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1/,
|
||||
property: /(\b|\B)[\w-]+(?=\s*:)/i,
|
||||
important: /\B!important\b/i,
|
||||
function: /[-a-z0-9]+(?=\()/i,
|
||||
punctuation: /[(){};:]/
|
||||
};
|
||||
Prism.languages.css.atrule.inside.rest = Prism.util.clone(Prism.languages.css);
|
||||
if (Prism.languages.markup) {
|
||||
Prism.languages.insertBefore('markup', 'tag', {
|
||||
style: {
|
||||
pattern: /<style[\w\W]*?>[\w\W]*?<\/style>/i,
|
||||
inside: {
|
||||
tag: {
|
||||
pattern: /<style[\w\W]*?>|<\/style>/i,
|
||||
inside: Prism.languages.markup.tag.inside
|
||||
},
|
||||
rest: Prism.languages.css
|
||||
},
|
||||
alias: 'language-css'
|
||||
}
|
||||
});
|
||||
Prism.languages.insertBefore('inside', 'attr-value', {
|
||||
'style-attr': {
|
||||
pattern: /\s*style=("|').*?\1/i,
|
||||
inside: {
|
||||
'attr-name': {
|
||||
pattern: /^\s*style/i,
|
||||
inside: Prism.languages.markup.tag.inside
|
||||
},
|
||||
'punctuation': /^\s*=\s*['"]|['"]\s*$/,
|
||||
'attr-value': {
|
||||
pattern: /.+/i,
|
||||
inside: Prism.languages.css
|
||||
}
|
||||
},
|
||||
alias: 'language-css'
|
||||
}
|
||||
}, Prism.languages.markup.tag);
|
||||
}
|
||||
Prism.languages.clike = {
|
||||
'comment': [
|
||||
{
|
||||
pattern: /(^|[^\\])\/\*[\w\W]*?\*\//,
|
||||
lookbehind: true
|
||||
},
|
||||
{
|
||||
pattern: /(^|[^\\:])\/\/.*/,
|
||||
lookbehind: true
|
||||
}
|
||||
],
|
||||
'string': /(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
|
||||
'class-name': {
|
||||
pattern: /((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/i,
|
||||
lookbehind: true,
|
||||
inside: { punctuation: /(\.|\\)/ }
|
||||
},
|
||||
'keyword': /\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,
|
||||
'boolean': /\b(true|false)\b/,
|
||||
'function': /[a-z0-9_]+(?=\()/i,
|
||||
'number': /\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,
|
||||
'operator': /--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,
|
||||
'punctuation': /[{}[\];(),.:]/
|
||||
};
|
||||
Prism.languages.javascript = Prism.languages.extend('clike', {
|
||||
keyword: /\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/,
|
||||
number: /\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/,
|
||||
function: /[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i
|
||||
});
|
||||
Prism.languages.insertBefore('javascript', 'keyword', {
|
||||
regex: {
|
||||
pattern: /(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\\\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/,
|
||||
lookbehind: true
|
||||
}
|
||||
});
|
||||
Prism.languages.insertBefore('javascript', 'class-name', {
|
||||
'template-string': {
|
||||
pattern: /`(?:\\`|\\?[^`])*`/,
|
||||
inside: {
|
||||
interpolation: {
|
||||
pattern: /\$\{[^}]+\}/,
|
||||
inside: {
|
||||
'interpolation-punctuation': {
|
||||
pattern: /^\$\{|\}$/,
|
||||
alias: 'punctuation'
|
||||
},
|
||||
'rest': Prism.languages.javascript
|
||||
}
|
||||
},
|
||||
string: /[\s\S]+/
|
||||
}
|
||||
}
|
||||
});
|
||||
if (Prism.languages.markup) {
|
||||
Prism.languages.insertBefore('markup', 'tag', {
|
||||
script: {
|
||||
pattern: /<script[\w\W]*?>[\w\W]*?<\/script>/i,
|
||||
inside: {
|
||||
tag: {
|
||||
pattern: /<script[\w\W]*?>|<\/script>/i,
|
||||
inside: Prism.languages.markup.tag.inside
|
||||
},
|
||||
rest: Prism.languages.javascript
|
||||
},
|
||||
alias: 'language-javascript'
|
||||
}
|
||||
});
|
||||
}
|
||||
Prism.languages.js = Prism.languages.javascript;
|
||||
Prism.languages.c = Prism.languages.extend('clike', {
|
||||
keyword: /\b(asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,
|
||||
operator: /\-[>-]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|?\||[~^%?*\/]/,
|
||||
number: /\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)[ful]*\b/i
|
||||
});
|
||||
Prism.languages.insertBefore('c', 'string', {
|
||||
macro: {
|
||||
pattern: /(^\s*)#\s*[a-z]+([^\r\n\\]|\\.|\\(?:\r\n?|\n))*/im,
|
||||
lookbehind: true,
|
||||
alias: 'property',
|
||||
inside: {
|
||||
string: {
|
||||
pattern: /(#\s*include\s*)(<.+?>|("|')(\\?.)+?\3)/,
|
||||
lookbehind: true
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
delete Prism.languages.c['class-name'];
|
||||
delete Prism.languages.c.boolean;
|
||||
Prism.languages.csharp = Prism.languages.extend('clike', {
|
||||
keyword: /\b(abstract|as|async|await|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|do|double|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|goto|if|implicit|in|int|interface|internal|is|lock|long|namespace|new|null|object|operator|out|override|params|private|protected|public|readonly|ref|return|sbyte|sealed|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|virtual|void|volatile|while|add|alias|ascending|async|await|descending|dynamic|from|get|global|group|into|join|let|orderby|partial|remove|select|set|value|var|where|yield)\b/,
|
||||
string: [
|
||||
/@("|')(\1\1|\\\1|\\?(?!\1)[\s\S])*\1/,
|
||||
/("|')(\\?.)*?\1/
|
||||
],
|
||||
number: /\b-?(0x[\da-f]+|\d*\.?\d+)\b/i
|
||||
});
|
||||
Prism.languages.insertBefore('csharp', 'keyword', {
|
||||
preprocessor: {
|
||||
pattern: /(^\s*)#.*/m,
|
||||
lookbehind: true
|
||||
}
|
||||
});
|
||||
Prism.languages.cpp = Prism.languages.extend('c', {
|
||||
keyword: /\b(alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,
|
||||
boolean: /\b(true|false)\b/,
|
||||
operator: /[-+]{1,2}|!=?|<{1,2}=?|>{1,2}=?|\->|:{1,2}|={1,2}|\^|~|%|&{1,2}|\|?\||\?|\*|\/|\b(and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/
|
||||
});
|
||||
Prism.languages.insertBefore('cpp', 'keyword', {
|
||||
'class-name': {
|
||||
pattern: /(class\s+)[a-z0-9_]+/i,
|
||||
lookbehind: true
|
||||
}
|
||||
});
|
||||
Prism.languages.java = Prism.languages.extend('clike', {
|
||||
keyword: /\b(abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while)\b/,
|
||||
number: /\b0b[01]+\b|\b0x[\da-f]*\.?[\da-fp\-]+\b|\b\d*\.?\d+(?:e[+-]?\d+)?[df]?\b/i,
|
||||
operator: {
|
||||
pattern: /(^|[^.])(?:\+[+=]?|-[-=]?|!=?|<<?=?|>>?>?=?|==?|&[&=]?|\|[|=]?|\*=?|\/=?|%=?|\^=?|[?:~])/m,
|
||||
lookbehind: true
|
||||
}
|
||||
});
|
||||
Prism.languages.php = Prism.languages.extend('clike', {
|
||||
keyword: /\b(and|or|xor|array|as|break|case|cfunction|class|const|continue|declare|default|die|do|else|elseif|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|for|foreach|function|include|include_once|global|if|new|return|static|switch|use|require|require_once|var|while|abstract|interface|public|implements|private|protected|parent|throw|null|echo|print|trait|namespace|final|yield|goto|instanceof|finally|try|catch)\b/i,
|
||||
constant: /\b[A-Z0-9_]{2,}\b/,
|
||||
comment: {
|
||||
pattern: /(^|[^\\])(?:\/\*[\w\W]*?\*\/|\/\/.*)/,
|
||||
lookbehind: true
|
||||
}
|
||||
});
|
||||
Prism.languages.insertBefore('php', 'class-name', {
|
||||
'shell-comment': {
|
||||
pattern: /(^|[^\\])#.*/,
|
||||
lookbehind: true,
|
||||
alias: 'comment'
|
||||
}
|
||||
});
|
||||
Prism.languages.insertBefore('php', 'keyword', {
|
||||
delimiter: /\?>|<\?(?:php)?/i,
|
||||
variable: /\$\w+\b/i,
|
||||
package: {
|
||||
pattern: /(\\|namespace\s+|use\s+)[\w\\]+/,
|
||||
lookbehind: true,
|
||||
inside: { punctuation: /\\/ }
|
||||
}
|
||||
});
|
||||
Prism.languages.insertBefore('php', 'operator', {
|
||||
property: {
|
||||
pattern: /(->)[\w]+/,
|
||||
lookbehind: true
|
||||
}
|
||||
});
|
||||
if (Prism.languages.markup) {
|
||||
Prism.hooks.add('before-highlight', function (env) {
|
||||
if (env.language !== 'php') {
|
||||
return;
|
||||
}
|
||||
env.tokenStack = [];
|
||||
env.backupCode = env.code;
|
||||
env.code = env.code.replace(/(?:<\?php|<\?)[\w\W]*?(?:\?>)/ig, function (match) {
|
||||
env.tokenStack.push(match);
|
||||
return '{{{PHP' + env.tokenStack.length + '}}}';
|
||||
});
|
||||
});
|
||||
Prism.hooks.add('before-insert', function (env) {
|
||||
if (env.language === 'php') {
|
||||
env.code = env.backupCode;
|
||||
delete env.backupCode;
|
||||
}
|
||||
});
|
||||
Prism.hooks.add('after-highlight', function (env) {
|
||||
if (env.language !== 'php') {
|
||||
return;
|
||||
}
|
||||
for (var i = 0, t = void 0; t = env.tokenStack[i]; i++) {
|
||||
env.highlightedCode = env.highlightedCode.replace('{{{PHP' + (i + 1) + '}}}', Prism.highlight(t, env.grammar, 'php').replace(/\$/g, '$$$$'));
|
||||
}
|
||||
env.element.innerHTML = env.highlightedCode;
|
||||
});
|
||||
Prism.hooks.add('wrap', function (env) {
|
||||
if (env.language === 'php' && env.type === 'markup') {
|
||||
env.content = env.content.replace(/(\{\{\{PHP[0-9]+\}\}\})/g, '<span class="token php">$1</span>');
|
||||
}
|
||||
});
|
||||
Prism.languages.insertBefore('php', 'comment', {
|
||||
markup: {
|
||||
pattern: /<[^?]\/?(.*?)>/,
|
||||
inside: Prism.languages.markup
|
||||
},
|
||||
php: /\{\{\{PHP[0-9]+\}\}\}/
|
||||
});
|
||||
}
|
||||
Prism.languages.python = {
|
||||
'comment': {
|
||||
pattern: /(^|[^\\])#.*/,
|
||||
lookbehind: true
|
||||
},
|
||||
'string': /"""[\s\S]+?"""|'''[\s\S]+?'''|("|')(?:\\?.)*?\1/,
|
||||
'function': {
|
||||
pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_][a-zA-Z0-9_]*(?=\()/g,
|
||||
lookbehind: true
|
||||
},
|
||||
'class-name': {
|
||||
pattern: /(\bclass\s+)[a-z0-9_]+/i,
|
||||
lookbehind: true
|
||||
},
|
||||
'keyword': /\b(?:as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|pass|print|raise|return|try|while|with|yield)\b/,
|
||||
'boolean': /\b(?:True|False)\b/,
|
||||
'number': /\b-?(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,
|
||||
'operator': /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not)\b/,
|
||||
'punctuation': /[{}[\];(),.:]/
|
||||
};
|
||||
(function (Prism) {
|
||||
Prism.languages.ruby = Prism.languages.extend('clike', {
|
||||
comment: /#(?!\{[^\r\n]*?\}).*/,
|
||||
keyword: /\b(alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|false|for|if|in|module|new|next|nil|not|or|raise|redo|require|rescue|retry|return|self|super|then|throw|true|undef|unless|until|when|while|yield)\b/
|
||||
});
|
||||
var interpolation = {
|
||||
pattern: /#\{[^}]+\}/,
|
||||
inside: {
|
||||
delimiter: {
|
||||
pattern: /^#\{|\}$/,
|
||||
alias: 'tag'
|
||||
},
|
||||
rest: Prism.util.clone(Prism.languages.ruby)
|
||||
}
|
||||
};
|
||||
Prism.languages.insertBefore('ruby', 'keyword', {
|
||||
regex: [
|
||||
{
|
||||
pattern: /%r([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1[gim]{0,3}/,
|
||||
inside: { interpolation: interpolation }
|
||||
},
|
||||
{
|
||||
pattern: /%r\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/,
|
||||
inside: { interpolation: interpolation }
|
||||
},
|
||||
{
|
||||
pattern: /%r\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/,
|
||||
inside: { interpolation: interpolation }
|
||||
},
|
||||
{
|
||||
pattern: /%r\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/,
|
||||
inside: { interpolation: interpolation }
|
||||
},
|
||||
{
|
||||
pattern: /%r<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/,
|
||||
inside: { interpolation: interpolation }
|
||||
},
|
||||
{
|
||||
pattern: /(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/,
|
||||
lookbehind: true
|
||||
}
|
||||
],
|
||||
variable: /[@$]+[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/,
|
||||
symbol: /:[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/
|
||||
});
|
||||
Prism.languages.insertBefore('ruby', 'number', {
|
||||
builtin: /\b(Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|File|Fixnum|Fload|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,
|
||||
constant: /\b[A-Z][a-zA-Z_0-9]*(?:[?!]|\b)/
|
||||
});
|
||||
Prism.languages.ruby.string = [
|
||||
{
|
||||
pattern: /%[qQiIwWxs]?([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1/,
|
||||
inside: { interpolation: interpolation }
|
||||
},
|
||||
{
|
||||
pattern: /%[qQiIwWxs]?\((?:[^()\\]|\\[\s\S])*\)/,
|
||||
inside: { interpolation: interpolation }
|
||||
},
|
||||
{
|
||||
pattern: /%[qQiIwWxs]?\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/,
|
||||
inside: { interpolation: interpolation }
|
||||
},
|
||||
{
|
||||
pattern: /%[qQiIwWxs]?\[(?:[^\[\]\\]|\\[\s\S])*\]/,
|
||||
inside: { interpolation: interpolation }
|
||||
},
|
||||
{
|
||||
pattern: /%[qQiIwWxs]?<(?:[^<>\\]|\\[\s\S])*>/,
|
||||
inside: { interpolation: interpolation }
|
||||
},
|
||||
{
|
||||
pattern: /("|')(#\{[^}]+\}|\\(?:\r?\n|\r)|\\?.)*?\1/,
|
||||
inside: { interpolation: interpolation }
|
||||
}
|
||||
];
|
||||
}(Prism));
|
||||
|
||||
function isCodeSample(elm) {
|
||||
return elm && elm.nodeName === 'PRE' && elm.className.indexOf('language-') !== -1;
|
||||
}
|
||||
function trimArg(predicateFn) {
|
||||
return function (arg1, arg2) {
|
||||
return predicateFn(arg2);
|
||||
};
|
||||
}
|
||||
var $_ed862ja1jh8lpuih = {
|
||||
isCodeSample: isCodeSample,
|
||||
trimArg: trimArg
|
||||
};
|
||||
|
||||
var getSelectedCodeSample = function (editor) {
|
||||
var node = editor.selection.getNode();
|
||||
if ($_ed862ja1jh8lpuih.isCodeSample(node)) {
|
||||
return node;
|
||||
}
|
||||
return null;
|
||||
};
|
||||
var insertCodeSample = function (editor, language, code) {
|
||||
editor.undoManager.transact(function () {
|
||||
var node = getSelectedCodeSample(editor);
|
||||
code = global$1.DOM.encode(code);
|
||||
if (node) {
|
||||
editor.dom.setAttrib(node, 'class', 'language-' + language);
|
||||
node.innerHTML = code;
|
||||
Prism.highlightElement(node);
|
||||
editor.selection.select(node);
|
||||
} else {
|
||||
editor.insertContent('<pre id="__new" class="language-' + language + '">' + code + '</pre>');
|
||||
editor.selection.select(editor.$('#__new').removeAttr('id')[0]);
|
||||
}
|
||||
});
|
||||
};
|
||||
var getCurrentCode = function (editor) {
|
||||
var node = getSelectedCodeSample(editor);
|
||||
if (node) {
|
||||
return node.textContent;
|
||||
}
|
||||
return '';
|
||||
};
|
||||
var $_2bh0wp9zjh8lpuhk = {
|
||||
getSelectedCodeSample: getSelectedCodeSample,
|
||||
insertCodeSample: insertCodeSample,
|
||||
getCurrentCode: getCurrentCode
|
||||
};
|
||||
|
||||
var getLanguages$1 = function (editor) {
|
||||
var defaultLanguages = [
|
||||
{
|
||||
text: 'HTML/XML',
|
||||
value: 'markup'
|
||||
},
|
||||
{
|
||||
text: 'JavaScript',
|
||||
value: 'javascript'
|
||||
},
|
||||
{
|
||||
text: 'CSS',
|
||||
value: 'css'
|
||||
},
|
||||
{
|
||||
text: 'PHP',
|
||||
value: 'php'
|
||||
},
|
||||
{
|
||||
text: 'Ruby',
|
||||
value: 'ruby'
|
||||
},
|
||||
{
|
||||
text: 'Python',
|
||||
value: 'python'
|
||||
},
|
||||
{
|
||||
text: 'Java',
|
||||
value: 'java'
|
||||
},
|
||||
{
|
||||
text: 'C',
|
||||
value: 'c'
|
||||
},
|
||||
{
|
||||
text: 'C#',
|
||||
value: 'csharp'
|
||||
},
|
||||
{
|
||||
text: 'C++',
|
||||
value: 'cpp'
|
||||
}
|
||||
];
|
||||
var customLanguages = $_3ew0z79xjh8lpuhi.getLanguages(editor);
|
||||
return customLanguages ? customLanguages : defaultLanguages;
|
||||
};
|
||||
var getCurrentLanguage = function (editor) {
|
||||
var matches;
|
||||
var node = $_2bh0wp9zjh8lpuhk.getSelectedCodeSample(editor);
|
||||
if (node) {
|
||||
matches = node.className.match(/language-(\w+)/);
|
||||
return matches ? matches[1] : '';
|
||||
}
|
||||
return '';
|
||||
};
|
||||
var $_dqyreda2jh8lpuii = {
|
||||
getLanguages: getLanguages$1,
|
||||
getCurrentLanguage: getCurrentLanguage
|
||||
};
|
||||
|
||||
var $_17ew2k9wjh8lpuhh = {
|
||||
open: function (editor) {
|
||||
var minWidth = $_3ew0z79xjh8lpuhi.getDialogMinWidth(editor);
|
||||
var minHeight = $_3ew0z79xjh8lpuhi.getDialogMinHeight(editor);
|
||||
var currentLanguage = $_dqyreda2jh8lpuii.getCurrentLanguage(editor);
|
||||
var currentLanguages = $_dqyreda2jh8lpuii.getLanguages(editor);
|
||||
var currentCode = $_2bh0wp9zjh8lpuhk.getCurrentCode(editor);
|
||||
editor.windowManager.open({
|
||||
title: 'Insert/Edit code sample',
|
||||
minWidth: minWidth,
|
||||
minHeight: minHeight,
|
||||
layout: 'flex',
|
||||
direction: 'column',
|
||||
align: 'stretch',
|
||||
body: [
|
||||
{
|
||||
type: 'listbox',
|
||||
name: 'language',
|
||||
label: 'Language',
|
||||
maxWidth: 200,
|
||||
value: currentLanguage,
|
||||
values: currentLanguages
|
||||
},
|
||||
{
|
||||
type: 'textbox',
|
||||
name: 'code',
|
||||
multiline: true,
|
||||
spellcheck: false,
|
||||
ariaLabel: 'Code view',
|
||||
flex: 1,
|
||||
style: 'direction: ltr; text-align: left',
|
||||
classes: 'monospace',
|
||||
value: currentCode,
|
||||
autofocus: true
|
||||
}
|
||||
],
|
||||
onSubmit: function (e) {
|
||||
$_2bh0wp9zjh8lpuhk.insertCodeSample(editor, e.data.language, e.data.code);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
var register = function (editor) {
|
||||
editor.addCommand('codesample', function () {
|
||||
var node = editor.selection.getNode();
|
||||
if (editor.selection.isCollapsed() || $_ed862ja1jh8lpuih.isCodeSample(node)) {
|
||||
$_17ew2k9wjh8lpuhh.open(editor);
|
||||
} else {
|
||||
editor.formatter.toggle('code');
|
||||
}
|
||||
});
|
||||
};
|
||||
var $_g7hv619vjh8lpuhg = { register: register };
|
||||
|
||||
var setup = function (editor) {
|
||||
var $ = editor.$;
|
||||
editor.on('PreProcess', function (e) {
|
||||
$('pre[contenteditable=false]', e.node).filter($_ed862ja1jh8lpuih.trimArg($_ed862ja1jh8lpuih.isCodeSample)).each(function (idx, elm) {
|
||||
var $elm = $(elm), code = elm.textContent;
|
||||
$elm.attr('class', $.trim($elm.attr('class')));
|
||||
$elm.removeAttr('contentEditable');
|
||||
$elm.empty().append($('<code></code>').each(function () {
|
||||
this.textContent = code;
|
||||
}));
|
||||
});
|
||||
});
|
||||
editor.on('SetContent', function () {
|
||||
var unprocessedCodeSamples = $('pre').filter($_ed862ja1jh8lpuih.trimArg($_ed862ja1jh8lpuih.isCodeSample)).filter(function (idx, elm) {
|
||||
return elm.contentEditable !== 'false';
|
||||
});
|
||||
if (unprocessedCodeSamples.length) {
|
||||
editor.undoManager.transact(function () {
|
||||
unprocessedCodeSamples.each(function (idx, elm) {
|
||||
$(elm).find('br').each(function (idx, elm) {
|
||||
elm.parentNode.replaceChild(editor.getDoc().createTextNode('\n'), elm);
|
||||
});
|
||||
elm.contentEditable = false;
|
||||
elm.innerHTML = editor.dom.encode(elm.textContent);
|
||||
Prism.highlightElement(elm);
|
||||
elm.className = $.trim(elm.className);
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
var $_bhr6mpa3jh8lpuik = { setup: setup };
|
||||
|
||||
var loadCss = function (editor, pluginUrl, addedInlineCss, addedCss) {
|
||||
var linkElm;
|
||||
var contentCss = $_3ew0z79xjh8lpuhi.getContentCss(editor);
|
||||
if (editor.inline && addedInlineCss.get()) {
|
||||
return;
|
||||
}
|
||||
if (!editor.inline && addedCss.get()) {
|
||||
return;
|
||||
}
|
||||
if (editor.inline) {
|
||||
addedInlineCss.set(true);
|
||||
} else {
|
||||
addedCss.set(true);
|
||||
}
|
||||
if (contentCss !== false) {
|
||||
linkElm = editor.dom.create('link', {
|
||||
rel: 'stylesheet',
|
||||
href: contentCss ? contentCss : pluginUrl + '/css/prism.css'
|
||||
});
|
||||
editor.getDoc().getElementsByTagName('head')[0].appendChild(linkElm);
|
||||
}
|
||||
};
|
||||
var $_9m8czaa4jh8lpuim = { loadCss: loadCss };
|
||||
|
||||
var register$1 = function (editor) {
|
||||
editor.addButton('codesample', {
|
||||
cmd: 'codesample',
|
||||
title: 'Insert/Edit code sample'
|
||||
});
|
||||
editor.addMenuItem('codesample', {
|
||||
cmd: 'codesample',
|
||||
text: 'Code sample',
|
||||
icon: 'codesample'
|
||||
});
|
||||
};
|
||||
var $_7n1bf0a5jh8lpuin = { register: register$1 };
|
||||
|
||||
var addedInlineCss = Cell(false);
|
||||
global.add('codesample', function (editor, pluginUrl) {
|
||||
var addedCss = Cell(false);
|
||||
$_bhr6mpa3jh8lpuik.setup(editor);
|
||||
$_7n1bf0a5jh8lpuin.register(editor);
|
||||
$_g7hv619vjh8lpuhg.register(editor);
|
||||
editor.on('init', function () {
|
||||
$_9m8czaa4jh8lpuim.loadCss(editor, pluginUrl, addedInlineCss, addedCss);
|
||||
});
|
||||
editor.on('dblclick', function (ev) {
|
||||
if ($_ed862ja1jh8lpuih.isCodeSample(ev.target)) {
|
||||
$_17ew2k9wjh8lpuhh.open(editor);
|
||||
}
|
||||
});
|
||||
});
|
||||
function Plugin () {
|
||||
}
|
||||
|
||||
return Plugin;
|
||||
|
||||
}());
|
||||
})();
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,7 @@
|
||||
// Exports the "colorpicker" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/colorpicker')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/colorpicker'
|
||||
require('./plugin.js');
|
||||
@@ -1,112 +1,126 @@
|
||||
/**
|
||||
* plugin.js
|
||||
*
|
||||
* Copyright, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
(function () {
|
||||
var colorpicker = (function () {
|
||||
'use strict';
|
||||
|
||||
/*global tinymce:true */
|
||||
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
||||
|
||||
tinymce.PluginManager.add('colorpicker', function(editor) {
|
||||
function colorPickerCallback(callback, value) {
|
||||
function setColor(value) {
|
||||
var color = new tinymce.util.Color(value), rgb = color.toRgb();
|
||||
var global$1 = tinymce.util.Tools.resolve('tinymce.util.Color');
|
||||
|
||||
win.fromJSON({
|
||||
r: rgb.r,
|
||||
g: rgb.g,
|
||||
b: rgb.b,
|
||||
hex: color.toHex().substr(1)
|
||||
});
|
||||
var showPreview = function (win, hexColor) {
|
||||
win.find('#preview')[0].getEl().style.background = hexColor;
|
||||
};
|
||||
var setColor = function (win, value) {
|
||||
var color = global$1(value), rgb = color.toRgb();
|
||||
win.fromJSON({
|
||||
r: rgb.r,
|
||||
g: rgb.g,
|
||||
b: rgb.b,
|
||||
hex: color.toHex().substr(1)
|
||||
});
|
||||
showPreview(win, color.toHex());
|
||||
};
|
||||
var open = function (editor, callback, value) {
|
||||
var win = editor.windowManager.open({
|
||||
title: 'Color',
|
||||
items: {
|
||||
type: 'container',
|
||||
layout: 'flex',
|
||||
direction: 'row',
|
||||
align: 'stretch',
|
||||
padding: 5,
|
||||
spacing: 10,
|
||||
items: [
|
||||
{
|
||||
type: 'colorpicker',
|
||||
value: value,
|
||||
onchange: function () {
|
||||
var rgb = this.rgb();
|
||||
if (win) {
|
||||
win.find('#r').value(rgb.r);
|
||||
win.find('#g').value(rgb.g);
|
||||
win.find('#b').value(rgb.b);
|
||||
win.find('#hex').value(this.value().substr(1));
|
||||
showPreview(win, this.value());
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'form',
|
||||
padding: 0,
|
||||
labelGap: 5,
|
||||
defaults: {
|
||||
type: 'textbox',
|
||||
size: 7,
|
||||
value: '0',
|
||||
flex: 1,
|
||||
spellcheck: false,
|
||||
onchange: function () {
|
||||
var colorPickerCtrl = win.find('colorpicker')[0];
|
||||
var name, value;
|
||||
name = this.name();
|
||||
value = this.value();
|
||||
if (name === 'hex') {
|
||||
value = '#' + value;
|
||||
setColor(win, value);
|
||||
colorPickerCtrl.value(value);
|
||||
return;
|
||||
}
|
||||
value = {
|
||||
r: win.find('#r').value(),
|
||||
g: win.find('#g').value(),
|
||||
b: win.find('#b').value()
|
||||
};
|
||||
colorPickerCtrl.value(value);
|
||||
setColor(win, value);
|
||||
}
|
||||
},
|
||||
items: [
|
||||
{
|
||||
name: 'r',
|
||||
label: 'R',
|
||||
autofocus: 1
|
||||
},
|
||||
{
|
||||
name: 'g',
|
||||
label: 'G'
|
||||
},
|
||||
{
|
||||
name: 'b',
|
||||
label: 'B'
|
||||
},
|
||||
{
|
||||
name: 'hex',
|
||||
label: '#',
|
||||
value: '000000'
|
||||
},
|
||||
{
|
||||
name: 'preview',
|
||||
type: 'container',
|
||||
border: 1
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
onSubmit: function () {
|
||||
callback('#' + win.toJSON().hex);
|
||||
}
|
||||
});
|
||||
setColor(win, value);
|
||||
};
|
||||
var $_5qw23qa8jh8lpujn = { open: open };
|
||||
|
||||
showPreview(color.toHex());
|
||||
}
|
||||
global.add('colorpicker', function (editor) {
|
||||
if (!editor.settings.color_picker_callback) {
|
||||
editor.settings.color_picker_callback = function (callback, value) {
|
||||
$_5qw23qa8jh8lpujn.open(editor, callback, value);
|
||||
};
|
||||
}
|
||||
});
|
||||
function Plugin () {
|
||||
}
|
||||
|
||||
function showPreview(hexColor) {
|
||||
win.find('#preview')[0].getEl().style.background = hexColor;
|
||||
}
|
||||
return Plugin;
|
||||
|
||||
var win = editor.windowManager.open({
|
||||
title: 'Color',
|
||||
items: {
|
||||
type: 'container',
|
||||
layout: 'flex',
|
||||
direction: 'row',
|
||||
align: 'stretch',
|
||||
padding: 5,
|
||||
spacing: 10,
|
||||
items: [
|
||||
{
|
||||
type: 'colorpicker',
|
||||
value: value,
|
||||
onchange: function() {
|
||||
var rgb = this.rgb();
|
||||
|
||||
if (win) {
|
||||
win.find('#r').value(rgb.r);
|
||||
win.find('#g').value(rgb.g);
|
||||
win.find('#b').value(rgb.b);
|
||||
win.find('#hex').value(this.value().substr(1));
|
||||
showPreview(this.value());
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'form',
|
||||
padding: 0,
|
||||
labelGap: 5,
|
||||
defaults: {
|
||||
type: 'textbox',
|
||||
size: 7,
|
||||
value: '0',
|
||||
flex: 1,
|
||||
spellcheck: false,
|
||||
onchange: function() {
|
||||
var colorPickerCtrl = win.find('colorpicker')[0];
|
||||
var name, value;
|
||||
|
||||
name = this.name();
|
||||
value = this.value();
|
||||
|
||||
if (name == "hex") {
|
||||
value = '#' + value;
|
||||
setColor(value);
|
||||
colorPickerCtrl.value(value);
|
||||
return;
|
||||
}
|
||||
|
||||
value = {
|
||||
r: win.find('#r').value(),
|
||||
g: win.find('#g').value(),
|
||||
b: win.find('#b').value()
|
||||
};
|
||||
|
||||
colorPickerCtrl.value(value);
|
||||
setColor(value);
|
||||
}
|
||||
},
|
||||
items: [
|
||||
{name: 'r', label: 'R', autofocus: 1},
|
||||
{name: 'g', label: 'G'},
|
||||
{name: 'b', label: 'B'},
|
||||
{name: 'hex', label: '#', value: '000000'},
|
||||
{name: 'preview', type: 'container', border: 1}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
onSubmit: function() {
|
||||
callback('#' + this.toJSON().hex);
|
||||
}
|
||||
});
|
||||
|
||||
setColor(value);
|
||||
}
|
||||
|
||||
if (!editor.settings.color_picker_callback) {
|
||||
editor.settings.color_picker_callback = colorPickerCallback;
|
||||
}
|
||||
});
|
||||
}());
|
||||
})();
|
||||
|
||||
@@ -1 +1 @@
|
||||
tinymce.PluginManager.add("colorpicker",function(a){function b(b,c){function d(a){var b=new tinymce.util.Color(a),c=b.toRgb();f.fromJSON({r:c.r,g:c.g,b:c.b,hex:b.toHex().substr(1)}),e(b.toHex())}function e(a){f.find("#preview")[0].getEl().style.background=a}var f=a.windowManager.open({title:"Color",items:{type:"container",layout:"flex",direction:"row",align:"stretch",padding:5,spacing:10,items:[{type:"colorpicker",value:c,onchange:function(){var a=this.rgb();f&&(f.find("#r").value(a.r),f.find("#g").value(a.g),f.find("#b").value(a.b),f.find("#hex").value(this.value().substr(1)),e(this.value()))}},{type:"form",padding:0,labelGap:5,defaults:{type:"textbox",size:7,value:"0",flex:1,spellcheck:!1,onchange:function(){var a,b,c=f.find("colorpicker")[0];return a=this.name(),b=this.value(),"hex"==a?(b="#"+b,d(b),void c.value(b)):(b={r:f.find("#r").value(),g:f.find("#g").value(),b:f.find("#b").value()},c.value(b),void d(b))}},items:[{name:"r",label:"R",autofocus:1},{name:"g",label:"G"},{name:"b",label:"B"},{name:"hex",label:"#",value:"000000"},{name:"preview",type:"container",border:1}]}]},onSubmit:function(){b("#"+this.toJSON().hex)}});d(c)}a.settings.color_picker_callback||(a.settings.color_picker_callback=b)});
|
||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),l=tinymce.util.Tools.resolve("tinymce.util.Color"),a=function(e,n){e.find("#preview")[0].getEl().style.background=n},o=function(e,n){var i=l(n),t=i.toRgb();e.fromJSON({r:t.r,g:t.g,b:t.b,hex:i.toHex().substr(1)}),a(e,i.toHex())},t=function(e,n,i){var t=e.windowManager.open({title:"Color",items:{type:"container",layout:"flex",direction:"row",align:"stretch",padding:5,spacing:10,items:[{type:"colorpicker",value:i,onchange:function(){var e=this.rgb();t&&(t.find("#r").value(e.r),t.find("#g").value(e.g),t.find("#b").value(e.b),t.find("#hex").value(this.value().substr(1)),a(t,this.value()))}},{type:"form",padding:0,labelGap:5,defaults:{type:"textbox",size:7,value:"0",flex:1,spellcheck:!1,onchange:function(){var e,n,i=t.find("colorpicker")[0];if(e=this.name(),n=this.value(),"hex"===e)return o(t,n="#"+n),void i.value(n);n={r:t.find("#r").value(),g:t.find("#g").value(),b:t.find("#b").value()},i.value(n),o(t,n)}},items:[{name:"r",label:"R",autofocus:1},{name:"g",label:"G"},{name:"b",label:"B"},{name:"hex",label:"#",value:"000000"},{name:"preview",type:"container",border:1}]}]},onSubmit:function(){n("#"+t.toJSON().hex)}});o(t,i)};e.add("colorpicker",function(i){i.settings.color_picker_callback||(i.settings.color_picker_callback=function(e,n){t(i,e,n)})})}();
|
||||
@@ -0,0 +1,7 @@
|
||||
// Exports the "contextmenu" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/contextmenu')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/contextmenu'
|
||||
require('./plugin.js');
|
||||
@@ -1,87 +1,168 @@
|
||||
/**
|
||||
* plugin.js
|
||||
*
|
||||
* Copyright, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
(function () {
|
||||
var contextmenu = (function () {
|
||||
'use strict';
|
||||
|
||||
/*global tinymce:true */
|
||||
var Cell = function (initial) {
|
||||
var value = initial;
|
||||
var get = function () {
|
||||
return value;
|
||||
};
|
||||
var set = function (v) {
|
||||
value = v;
|
||||
};
|
||||
var clone = function () {
|
||||
return Cell(get());
|
||||
};
|
||||
return {
|
||||
get: get,
|
||||
set: set,
|
||||
clone: clone
|
||||
};
|
||||
};
|
||||
|
||||
tinymce.PluginManager.add('contextmenu', function(editor) {
|
||||
var menu, contextmenuNeverUseNative = editor.settings.contextmenu_never_use_native;
|
||||
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
||||
|
||||
editor.on('contextmenu', function(e) {
|
||||
var contextmenu, doc = editor.getDoc();
|
||||
var get = function (visibleState) {
|
||||
var isContextMenuVisible = function () {
|
||||
return visibleState.get();
|
||||
};
|
||||
return { isContextMenuVisible: isContextMenuVisible };
|
||||
};
|
||||
var $_1plr87adjh8lpuk3 = { get: get };
|
||||
|
||||
// Block TinyMCE menu on ctrlKey
|
||||
if (e.ctrlKey && !contextmenuNeverUseNative) {
|
||||
return;
|
||||
}
|
||||
var shouldNeverUseNative = function (editor) {
|
||||
return editor.settings.contextmenu_never_use_native;
|
||||
};
|
||||
var getContextMenu = function (editor) {
|
||||
return editor.getParam('contextmenu', 'link openlink image inserttable | cell row column deletetable');
|
||||
};
|
||||
var $_aqpwplafjh8lpuk5 = {
|
||||
shouldNeverUseNative: shouldNeverUseNative,
|
||||
getContextMenu: getContextMenu
|
||||
};
|
||||
|
||||
e.preventDefault();
|
||||
var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
|
||||
|
||||
/**
|
||||
* WebKit/Blink on Mac has the odd behavior of selecting the target word or line this causes
|
||||
* issues when for example inserting images see: #7022
|
||||
*/
|
||||
if (tinymce.Env.mac && tinymce.Env.webkit) {
|
||||
if (e.button == 2 && doc.caretRangeFromPoint) {
|
||||
editor.selection.setRng(doc.caretRangeFromPoint(e.x, e.y));
|
||||
}
|
||||
}
|
||||
var getUiContainer = function (editor) {
|
||||
return global$1.DOM.select(editor.settings.ui_container)[0];
|
||||
};
|
||||
|
||||
contextmenu = editor.settings.contextmenu || 'link image inserttable | cell row column deletetable';
|
||||
var nu = function (x, y) {
|
||||
return {
|
||||
x: x,
|
||||
y: y
|
||||
};
|
||||
};
|
||||
var transpose = function (pos, dx, dy) {
|
||||
return nu(pos.x + dx, pos.y + dy);
|
||||
};
|
||||
var fromPageXY = function (e) {
|
||||
return nu(e.pageX, e.pageY);
|
||||
};
|
||||
var fromClientXY = function (e) {
|
||||
return nu(e.clientX, e.clientY);
|
||||
};
|
||||
var transposeUiContainer = function (element, pos) {
|
||||
if (element && global$1.DOM.getStyle(element, 'position', true) !== 'static') {
|
||||
var containerPos = global$1.DOM.getPos(element);
|
||||
var dx = containerPos.x - element.scrollLeft;
|
||||
var dy = containerPos.y - element.scrollTop;
|
||||
return transpose(pos, -dx, -dy);
|
||||
} else {
|
||||
return transpose(pos, 0, 0);
|
||||
}
|
||||
};
|
||||
var transposeContentAreaContainer = function (element, pos) {
|
||||
var containerPos = global$1.DOM.getPos(element);
|
||||
return transpose(pos, containerPos.x, containerPos.y);
|
||||
};
|
||||
var getPos = function (editor, e) {
|
||||
if (editor.inline) {
|
||||
return transposeUiContainer(getUiContainer(editor), fromPageXY(e));
|
||||
} else {
|
||||
var iframePos = transposeContentAreaContainer(editor.getContentAreaContainer(), fromClientXY(e));
|
||||
return transposeUiContainer(getUiContainer(editor), iframePos);
|
||||
}
|
||||
};
|
||||
var $_chvtdxagjh8lpuk6 = { getPos: getPos };
|
||||
|
||||
// Render menu
|
||||
if (!menu) {
|
||||
var items = [];
|
||||
var global$2 = tinymce.util.Tools.resolve('tinymce.ui.Factory');
|
||||
|
||||
tinymce.each(contextmenu.split(/[ ,]/), function(name) {
|
||||
var item = editor.menuItems[name];
|
||||
var global$3 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
||||
|
||||
if (name == '|') {
|
||||
item = {text: name};
|
||||
}
|
||||
var renderMenu = function (editor, visibleState) {
|
||||
var menu, contextmenu;
|
||||
var items = [];
|
||||
contextmenu = $_aqpwplafjh8lpuk5.getContextMenu(editor);
|
||||
global$3.each(contextmenu.split(/[ ,]/), function (name) {
|
||||
var item = editor.menuItems[name];
|
||||
if (name === '|') {
|
||||
item = { text: name };
|
||||
}
|
||||
if (item) {
|
||||
item.shortcut = '';
|
||||
items.push(item);
|
||||
}
|
||||
});
|
||||
for (var i = 0; i < items.length; i++) {
|
||||
if (items[i].text === '|') {
|
||||
if (i === 0 || i === items.length - 1) {
|
||||
items.splice(i, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
menu = global$2.create('menu', {
|
||||
items: items,
|
||||
context: 'contextmenu',
|
||||
classes: 'contextmenu'
|
||||
});
|
||||
menu.uiContainer = getUiContainer(editor);
|
||||
menu.renderTo(getUiContainer(editor));
|
||||
menu.on('hide', function (e) {
|
||||
if (e.control === this) {
|
||||
visibleState.set(false);
|
||||
}
|
||||
});
|
||||
editor.on('remove', function () {
|
||||
menu.remove();
|
||||
menu = null;
|
||||
});
|
||||
return menu;
|
||||
};
|
||||
var show = function (editor, pos, visibleState, menu) {
|
||||
if (menu.get() === null) {
|
||||
menu.set(renderMenu(editor, visibleState));
|
||||
} else {
|
||||
menu.get().show();
|
||||
}
|
||||
menu.get().moveTo(pos.x, pos.y);
|
||||
visibleState.set(true);
|
||||
};
|
||||
var $_5cxb8ajjh8lpukb = { show: show };
|
||||
|
||||
if (item) {
|
||||
item.shortcut = ''; // Hide shortcuts
|
||||
items.push(item);
|
||||
}
|
||||
});
|
||||
var isNativeOverrideKeyEvent = function (editor, e) {
|
||||
return e.ctrlKey && !$_aqpwplafjh8lpuk5.shouldNeverUseNative(editor);
|
||||
};
|
||||
var setup = function (editor, visibleState, menu) {
|
||||
editor.on('contextmenu', function (e) {
|
||||
if (isNativeOverrideKeyEvent(editor, e)) {
|
||||
return;
|
||||
}
|
||||
e.preventDefault();
|
||||
$_5cxb8ajjh8lpukb.show(editor, $_chvtdxagjh8lpuk6.getPos(editor, e), visibleState, menu);
|
||||
});
|
||||
};
|
||||
var $_fqo42laejh8lpuk4 = { setup: setup };
|
||||
|
||||
for (var i = 0; i < items.length; i++) {
|
||||
if (items[i].text == '|') {
|
||||
if (i === 0 || i == items.length - 1) {
|
||||
items.splice(i, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
global.add('contextmenu', function (editor) {
|
||||
var menu = Cell(null), visibleState = Cell(false);
|
||||
$_fqo42laejh8lpuk4.setup(editor, visibleState, menu);
|
||||
return $_1plr87adjh8lpuk3.get(visibleState);
|
||||
});
|
||||
function Plugin () {
|
||||
}
|
||||
|
||||
menu = new tinymce.ui.Menu({
|
||||
items: items,
|
||||
context: 'contextmenu'
|
||||
}).addClass('contextmenu').renderTo();
|
||||
return Plugin;
|
||||
|
||||
editor.on('remove', function() {
|
||||
menu.remove();
|
||||
menu = null;
|
||||
});
|
||||
} else {
|
||||
menu.show();
|
||||
}
|
||||
|
||||
// Position menu
|
||||
var pos = {x: e.pageX, y: e.pageY};
|
||||
|
||||
if (!editor.inline) {
|
||||
pos = tinymce.DOM.getPos(editor.getContentAreaContainer());
|
||||
pos.x += e.clientX;
|
||||
pos.y += e.clientY;
|
||||
}
|
||||
|
||||
menu.moveTo(pos.x, pos.y);
|
||||
});
|
||||
});
|
||||
}());
|
||||
})();
|
||||
|
||||
@@ -1 +1 @@
|
||||
tinymce.PluginManager.add("contextmenu",function(a){var b,c=a.settings.contextmenu_never_use_native;a.on("contextmenu",function(d){var e,f=a.getDoc();if(!d.ctrlKey||c){if(d.preventDefault(),tinymce.Env.mac&&tinymce.Env.webkit&&2==d.button&&f.caretRangeFromPoint&&a.selection.setRng(f.caretRangeFromPoint(d.x,d.y)),e=a.settings.contextmenu||"link image inserttable | cell row column deletetable",b)b.show();else{var g=[];tinymce.each(e.split(/[ ,]/),function(b){var c=a.menuItems[b];"|"==b&&(c={text:b}),c&&(c.shortcut="",g.push(c))});for(var h=0;h<g.length;h++)"|"==g[h].text&&(0===h||h==g.length-1)&&g.splice(h,1);b=new tinymce.ui.Menu({items:g,context:"contextmenu"}).addClass("contextmenu").renderTo(),a.on("remove",function(){b.remove(),b=null})}var i={x:d.pageX,y:d.pageY};a.inline||(i=tinymce.DOM.getPos(a.getContentAreaContainer()),i.x+=d.clientX,i.y+=d.clientY),b.moveTo(i.x,i.y)}})});
|
||||
!function(){"use strict";var o=function(t){var n=t,e=function(){return n};return{get:e,set:function(t){n=t},clone:function(){return o(e())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(t){return{isContextMenuVisible:function(){return t.get()}}},r=function(t){return t.settings.contextmenu_never_use_native},u=function(t){return t.getParam("contextmenu","link openlink image inserttable | cell row column deletetable")},l=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),s=function(t){return l.DOM.select(t.settings.ui_container)[0]},a=function(t,n){return{x:t,y:n}},f=function(t,n,e){return a(t.x+n,t.y+e)},m=function(t,n){if(t&&"static"!==l.DOM.getStyle(t,"position",!0)){var e=l.DOM.getPos(t),o=e.x-t.scrollLeft,i=e.y-t.scrollTop;return f(n,-o,-i)}return f(n,0,0)},c=function(t,n){if(t.inline)return m(s(t),a((u=n).pageX,u.pageY));var e,o,i,r,u,c=(e=t.getContentAreaContainer(),o=a((r=n).clientX,r.clientY),i=l.DOM.getPos(e),f(o,i.x,i.y));return m(s(t),c)},g=tinymce.util.Tools.resolve("tinymce.ui.Factory"),v=tinymce.util.Tools.resolve("tinymce.util.Tools"),y=function(t,n,e,o){null===o.get()?o.set(function(e,n){var t,o,i=[];o=u(e),v.each(o.split(/[ ,]/),function(t){var n=e.menuItems[t];"|"===t&&(n={text:t}),n&&(n.shortcut="",i.push(n))});for(var r=0;r<i.length;r++)"|"===i[r].text&&(0!==r&&r!==i.length-1||i.splice(r,1));return(t=g.create("menu",{items:i,context:"contextmenu",classes:"contextmenu"})).uiContainer=s(e),t.renderTo(s(e)),t.on("hide",function(t){t.control===this&&n.set(!1)}),e.on("remove",function(){t.remove(),t=null}),t}(t,e)):o.get().show(),o.get().moveTo(n.x,n.y),e.set(!0)},x=function(e,o,i){e.on("contextmenu",function(t){var n;n=e,(!t.ctrlKey||r(n))&&(t.preventDefault(),y(e,c(e,t),o,i))})};t.add("contextmenu",function(t){var n=o(null),e=o(!1);return x(t,e,n),i(e)})}();
|
||||
@@ -0,0 +1,7 @@
|
||||
// Exports the "directionality" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/directionality')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/directionality'
|
||||
require('./plugin.js');
|
||||
@@ -1,64 +1,66 @@
|
||||
/**
|
||||
* plugin.js
|
||||
*
|
||||
* Copyright, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
(function () {
|
||||
var directionality = (function () {
|
||||
'use strict';
|
||||
|
||||
/*global tinymce:true */
|
||||
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
||||
|
||||
tinymce.PluginManager.add('directionality', function(editor) {
|
||||
function setDir(dir) {
|
||||
var dom = editor.dom, curDir, blocks = editor.selection.getSelectedBlocks();
|
||||
var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
||||
|
||||
if (blocks.length) {
|
||||
curDir = dom.getAttrib(blocks[0], "dir");
|
||||
var setDir = function (editor, dir) {
|
||||
var dom = editor.dom;
|
||||
var curDir;
|
||||
var blocks = editor.selection.getSelectedBlocks();
|
||||
if (blocks.length) {
|
||||
curDir = dom.getAttrib(blocks[0], 'dir');
|
||||
global$1.each(blocks, function (block) {
|
||||
if (!dom.getParent(block.parentNode, '*[dir="' + dir + '"]', dom.getRoot())) {
|
||||
dom.setAttrib(block, 'dir', curDir !== dir ? dir : null);
|
||||
}
|
||||
});
|
||||
editor.nodeChanged();
|
||||
}
|
||||
};
|
||||
var $_buu6krapjh8lpukw = { setDir: setDir };
|
||||
|
||||
tinymce.each(blocks, function(block) {
|
||||
// Add dir to block if the parent block doesn't already have that dir
|
||||
if (!dom.getParent(block.parentNode, "*[dir='" + dir + "']", dom.getRoot())) {
|
||||
if (curDir != dir) {
|
||||
dom.setAttrib(block, "dir", dir);
|
||||
} else {
|
||||
dom.setAttrib(block, "dir", null);
|
||||
}
|
||||
}
|
||||
});
|
||||
var register = function (editor) {
|
||||
editor.addCommand('mceDirectionLTR', function () {
|
||||
$_buu6krapjh8lpukw.setDir(editor, 'ltr');
|
||||
});
|
||||
editor.addCommand('mceDirectionRTL', function () {
|
||||
$_buu6krapjh8lpukw.setDir(editor, 'rtl');
|
||||
});
|
||||
};
|
||||
var $_3sbtv0aojh8lpukv = { register: register };
|
||||
|
||||
editor.nodeChanged();
|
||||
}
|
||||
}
|
||||
var generateSelector = function (dir) {
|
||||
var selector = [];
|
||||
global$1.each('h1 h2 h3 h4 h5 h6 div p'.split(' '), function (name) {
|
||||
selector.push(name + '[dir=' + dir + ']');
|
||||
});
|
||||
return selector.join(',');
|
||||
};
|
||||
var register$1 = function (editor) {
|
||||
editor.addButton('ltr', {
|
||||
title: 'Left to right',
|
||||
cmd: 'mceDirectionLTR',
|
||||
stateSelector: generateSelector('ltr')
|
||||
});
|
||||
editor.addButton('rtl', {
|
||||
title: 'Right to left',
|
||||
cmd: 'mceDirectionRTL',
|
||||
stateSelector: generateSelector('rtl')
|
||||
});
|
||||
};
|
||||
var $_bdjfw5arjh8lpuky = { register: register$1 };
|
||||
|
||||
function generateSelector(dir) {
|
||||
var selector = [];
|
||||
global.add('directionality', function (editor) {
|
||||
$_3sbtv0aojh8lpukv.register(editor);
|
||||
$_bdjfw5arjh8lpuky.register(editor);
|
||||
});
|
||||
function Plugin () {
|
||||
}
|
||||
|
||||
tinymce.each('h1 h2 h3 h4 h5 h6 div p'.split(' '), function(name) {
|
||||
selector.push(name + '[dir=' + dir + ']');
|
||||
});
|
||||
return Plugin;
|
||||
|
||||
return selector.join(',');
|
||||
}
|
||||
|
||||
editor.addCommand('mceDirectionLTR', function() {
|
||||
setDir("ltr");
|
||||
});
|
||||
|
||||
editor.addCommand('mceDirectionRTL', function() {
|
||||
setDir("rtl");
|
||||
});
|
||||
|
||||
editor.addButton('ltr', {
|
||||
title: 'Left to right',
|
||||
cmd: 'mceDirectionLTR',
|
||||
stateSelector: generateSelector('ltr')
|
||||
});
|
||||
|
||||
editor.addButton('rtl', {
|
||||
title: 'Right to left',
|
||||
cmd: 'mceDirectionRTL',
|
||||
stateSelector: generateSelector('rtl')
|
||||
});
|
||||
});
|
||||
}());
|
||||
})();
|
||||
|
||||
@@ -1 +1 @@
|
||||
tinymce.PluginManager.add("directionality",function(a){function b(b){var c,d=a.dom,e=a.selection.getSelectedBlocks();e.length&&(c=d.getAttrib(e[0],"dir"),tinymce.each(e,function(a){d.getParent(a.parentNode,"*[dir='"+b+"']",d.getRoot())||(c!=b?d.setAttrib(a,"dir",b):d.setAttrib(a,"dir",null))}),a.nodeChanged())}function c(a){var b=[];return tinymce.each("h1 h2 h3 h4 h5 h6 div p".split(" "),function(c){b.push(c+"[dir="+a+"]")}),b.join(",")}a.addCommand("mceDirectionLTR",function(){b("ltr")}),a.addCommand("mceDirectionRTL",function(){b("rtl")}),a.addButton("ltr",{title:"Left to right",cmd:"mceDirectionLTR",stateSelector:c("ltr")}),a.addButton("rtl",{title:"Right to left",cmd:"mceDirectionRTL",stateSelector:c("rtl")})});
|
||||
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),c=tinymce.util.Tools.resolve("tinymce.util.Tools"),e=function(t,e){var i,n=t.dom,o=t.selection.getSelectedBlocks();o.length&&(i=n.getAttrib(o[0],"dir"),c.each(o,function(t){n.getParent(t.parentNode,'*[dir="'+e+'"]',n.getRoot())||n.setAttrib(t,"dir",i!==e?e:null)}),t.nodeChanged())},i=function(t){t.addCommand("mceDirectionLTR",function(){e(t,"ltr")}),t.addCommand("mceDirectionRTL",function(){e(t,"rtl")})},n=function(e){var i=[];return c.each("h1 h2 h3 h4 h5 h6 div p".split(" "),function(t){i.push(t+"[dir="+e+"]")}),i.join(",")},o=function(t){t.addButton("ltr",{title:"Left to right",cmd:"mceDirectionLTR",stateSelector:n("ltr")}),t.addButton("rtl",{title:"Right to left",cmd:"mceDirectionRTL",stateSelector:n("rtl")})};t.add("directionality",function(t){i(t),o(t)})}();
|
||||
@@ -0,0 +1,7 @@
|
||||
// Exports the "emoticons" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/emoticons')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/emoticons'
|
||||
require('./plugin.js');
|
||||
@@ -1,65 +1,87 @@
|
||||
/**
|
||||
* plugin.js
|
||||
*
|
||||
* Copyright, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
(function () {
|
||||
var emoticons = (function () {
|
||||
'use strict';
|
||||
|
||||
/*global tinymce:true */
|
||||
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
||||
|
||||
tinymce.PluginManager.add('emoticons', function(editor, url) {
|
||||
var emoticons = [
|
||||
["cool", "cry", "embarassed", "foot-in-mouth"],
|
||||
["frown", "innocent", "kiss", "laughing"],
|
||||
["money-mouth", "sealed", "smile", "surprised"],
|
||||
["tongue-out", "undecided", "wink", "yell"]
|
||||
];
|
||||
var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
||||
|
||||
function getHtml() {
|
||||
var emoticonsHtml;
|
||||
var emoticons = [
|
||||
[
|
||||
'cool',
|
||||
'cry',
|
||||
'embarassed',
|
||||
'foot-in-mouth'
|
||||
],
|
||||
[
|
||||
'frown',
|
||||
'innocent',
|
||||
'kiss',
|
||||
'laughing'
|
||||
],
|
||||
[
|
||||
'money-mouth',
|
||||
'sealed',
|
||||
'smile',
|
||||
'surprised'
|
||||
],
|
||||
[
|
||||
'tongue-out',
|
||||
'undecided',
|
||||
'wink',
|
||||
'yell'
|
||||
]
|
||||
];
|
||||
var getHtml = function (pluginUrl) {
|
||||
var emoticonsHtml;
|
||||
emoticonsHtml = '<table role="list" class="mce-grid">';
|
||||
global$1.each(emoticons, function (row) {
|
||||
emoticonsHtml += '<tr>';
|
||||
global$1.each(row, function (icon) {
|
||||
var emoticonUrl = pluginUrl + '/img/smiley-' + icon + '.gif';
|
||||
emoticonsHtml += '<td><a href="#" data-mce-url="' + emoticonUrl + '" data-mce-alt="' + icon + '" tabindex="-1" ' + 'role="option" aria-label="' + icon + '"><img src="' + emoticonUrl + '" style="width: 18px; height: 18px" role="presentation" /></a></td>';
|
||||
});
|
||||
emoticonsHtml += '</tr>';
|
||||
});
|
||||
emoticonsHtml += '</table>';
|
||||
return emoticonsHtml;
|
||||
};
|
||||
var $_ty332avjh8lpul9 = { getHtml: getHtml };
|
||||
|
||||
emoticonsHtml = '<table role="list" class="mce-grid">';
|
||||
var insertEmoticon = function (editor, src, alt) {
|
||||
editor.insertContent(editor.dom.createHTML('img', {
|
||||
src: src,
|
||||
alt: alt
|
||||
}));
|
||||
};
|
||||
var register = function (editor, pluginUrl) {
|
||||
var panelHtml = $_ty332avjh8lpul9.getHtml(pluginUrl);
|
||||
editor.addButton('emoticons', {
|
||||
type: 'panelbutton',
|
||||
panel: {
|
||||
role: 'application',
|
||||
autohide: true,
|
||||
html: panelHtml,
|
||||
onclick: function (e) {
|
||||
var linkElm = editor.dom.getParent(e.target, 'a');
|
||||
if (linkElm) {
|
||||
insertEmoticon(editor, linkElm.getAttribute('data-mce-url'), linkElm.getAttribute('data-mce-alt'));
|
||||
this.hide();
|
||||
}
|
||||
}
|
||||
},
|
||||
tooltip: 'Emoticons'
|
||||
});
|
||||
};
|
||||
var $_5iodwqaujh8lpul7 = { register: register };
|
||||
|
||||
tinymce.each(emoticons, function(row) {
|
||||
emoticonsHtml += '<tr>';
|
||||
global.add('emoticons', function (editor, pluginUrl) {
|
||||
$_5iodwqaujh8lpul7.register(editor, pluginUrl);
|
||||
});
|
||||
function Plugin () {
|
||||
}
|
||||
|
||||
tinymce.each(row, function(icon) {
|
||||
var emoticonUrl = url + '/img/smiley-' + icon + '.gif';
|
||||
return Plugin;
|
||||
|
||||
emoticonsHtml += '<td><a href="#" data-mce-url="' + emoticonUrl + '" data-mce-alt="' + icon + '" tabindex="-1" ' +
|
||||
'role="option" aria-label="' + icon + '"><img src="' +
|
||||
emoticonUrl + '" style="width: 18px; height: 18px" role="presentation" /></a></td>';
|
||||
});
|
||||
|
||||
emoticonsHtml += '</tr>';
|
||||
});
|
||||
|
||||
emoticonsHtml += '</table>';
|
||||
|
||||
return emoticonsHtml;
|
||||
}
|
||||
|
||||
editor.addButton('emoticons', {
|
||||
type: 'panelbutton',
|
||||
panel: {
|
||||
role: 'application',
|
||||
autohide: true,
|
||||
html: getHtml,
|
||||
onclick: function(e) {
|
||||
var linkElm = editor.dom.getParent(e.target, 'a');
|
||||
|
||||
if (linkElm) {
|
||||
editor.insertContent(
|
||||
'<img src="' + linkElm.getAttribute('data-mce-url') + '" alt="' + linkElm.getAttribute('data-mce-alt') + '" />'
|
||||
);
|
||||
|
||||
this.hide();
|
||||
}
|
||||
}
|
||||
},
|
||||
tooltip: 'Emoticons'
|
||||
});
|
||||
});
|
||||
}());
|
||||
})();
|
||||
|
||||
@@ -1 +1 @@
|
||||
tinymce.PluginManager.add("emoticons",function(a,b){function c(){var a;return a='<table role="list" class="mce-grid">',tinymce.each(d,function(c){a+="<tr>",tinymce.each(c,function(c){var d=b+"/img/smiley-"+c+".gif";a+='<td><a href="#" data-mce-url="'+d+'" data-mce-alt="'+c+'" tabindex="-1" role="option" aria-label="'+c+'"><img src="'+d+'" style="width: 18px; height: 18px" role="presentation" /></a></td>'}),a+="</tr>"}),a+="</table>"}var d=[["cool","cry","embarassed","foot-in-mouth"],["frown","innocent","kiss","laughing"],["money-mouth","sealed","smile","surprised"],["tongue-out","undecided","wink","yell"]];a.addButton("emoticons",{type:"panelbutton",panel:{role:"application",autohide:!0,html:c,onclick:function(b){var c=a.dom.getParent(b.target,"a");c&&(a.insertContent('<img src="'+c.getAttribute("data-mce-url")+'" alt="'+c.getAttribute("data-mce-alt")+'" />'),this.hide())}},tooltip:"Emoticons"})});
|
||||
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=tinymce.util.Tools.resolve("tinymce.util.Tools"),n=[["cool","cry","embarassed","foot-in-mouth"],["frown","innocent","kiss","laughing"],["money-mouth","sealed","smile","surprised"],["tongue-out","undecided","wink","yell"]],i=function(i){var o;return o='<table role="list" class="mce-grid">',e.each(n,function(t){o+="<tr>",e.each(t,function(t){var e=i+"/img/smiley-"+t+".gif";o+='<td><a href="#" data-mce-url="'+e+'" data-mce-alt="'+t+'" tabindex="-1" role="option" aria-label="'+t+'"><img src="'+e+'" style="width: 18px; height: 18px" role="presentation" /></a></td>'}),o+="</tr>"}),o+="</table>"},o=function(a,t){var e=i(t);a.addButton("emoticons",{type:"panelbutton",panel:{role:"application",autohide:!0,html:e,onclick:function(t){var e,i,o,n=a.dom.getParent(t.target,"a");n&&(e=a,i=n.getAttribute("data-mce-url"),o=n.getAttribute("data-mce-alt"),e.insertContent(e.dom.createHTML("img",{src:i,alt:o})),this.hide())}},tooltip:"Emoticons"})};t.add("emoticons",function(t,e){o(t,e)})}();
|
||||
@@ -0,0 +1,7 @@
|
||||
// Exports the "fullpage" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/fullpage')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/fullpage'
|
||||
require('./plugin.js');
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -0,0 +1,7 @@
|
||||
// Exports the "fullscreen" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/fullscreen')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/fullscreen'
|
||||
require('./plugin.js');
|
||||
@@ -1,136 +1,177 @@
|
||||
/**
|
||||
* plugin.js
|
||||
*
|
||||
* Copyright, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
(function () {
|
||||
var fullscreen = (function () {
|
||||
'use strict';
|
||||
|
||||
/*global tinymce:true */
|
||||
var Cell = function (initial) {
|
||||
var value = initial;
|
||||
var get = function () {
|
||||
return value;
|
||||
};
|
||||
var set = function (v) {
|
||||
value = v;
|
||||
};
|
||||
var clone = function () {
|
||||
return Cell(get());
|
||||
};
|
||||
return {
|
||||
get: get,
|
||||
set: set,
|
||||
clone: clone
|
||||
};
|
||||
};
|
||||
|
||||
tinymce.PluginManager.add('fullscreen', function(editor) {
|
||||
var fullscreenState = false, DOM = tinymce.DOM, iframeWidth, iframeHeight, resizeHandler;
|
||||
var containerWidth, containerHeight;
|
||||
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
||||
|
||||
if (editor.settings.inline) {
|
||||
return;
|
||||
}
|
||||
var get = function (fullscreenState) {
|
||||
return {
|
||||
isFullscreen: function () {
|
||||
return fullscreenState.get() !== null;
|
||||
}
|
||||
};
|
||||
};
|
||||
var $_id7tbbzjh8lpupt = { get: get };
|
||||
|
||||
function getWindowSize() {
|
||||
var w, h, win = window, doc = document;
|
||||
var body = doc.body;
|
||||
var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
|
||||
|
||||
// Old IE
|
||||
if (body.offsetWidth) {
|
||||
w = body.offsetWidth;
|
||||
h = body.offsetHeight;
|
||||
}
|
||||
var fireFullscreenStateChanged = function (editor, state) {
|
||||
editor.fire('FullscreenStateChanged', { state: state });
|
||||
};
|
||||
var $_i7kzec3jh8lpupz = { fireFullscreenStateChanged: fireFullscreenStateChanged };
|
||||
|
||||
// Modern browsers
|
||||
if (win.innerWidth && win.innerHeight) {
|
||||
w = win.innerWidth;
|
||||
h = win.innerHeight;
|
||||
}
|
||||
var DOM = global$1.DOM;
|
||||
var getWindowSize = function () {
|
||||
var w;
|
||||
var h;
|
||||
var win = window;
|
||||
var doc = document;
|
||||
var body = doc.body;
|
||||
if (body.offsetWidth) {
|
||||
w = body.offsetWidth;
|
||||
h = body.offsetHeight;
|
||||
}
|
||||
if (win.innerWidth && win.innerHeight) {
|
||||
w = win.innerWidth;
|
||||
h = win.innerHeight;
|
||||
}
|
||||
return {
|
||||
w: w,
|
||||
h: h
|
||||
};
|
||||
};
|
||||
var getScrollPos = function () {
|
||||
var vp = DOM.getViewPort();
|
||||
return {
|
||||
x: vp.x,
|
||||
y: vp.y
|
||||
};
|
||||
};
|
||||
var setScrollPos = function (pos) {
|
||||
window.scrollTo(pos.x, pos.y);
|
||||
};
|
||||
var toggleFullscreen = function (editor, fullscreenState) {
|
||||
var body = document.body;
|
||||
var documentElement = document.documentElement;
|
||||
var editorContainerStyle;
|
||||
var editorContainer, iframe, iframeStyle;
|
||||
var fullscreenInfo = fullscreenState.get();
|
||||
var resize = function () {
|
||||
DOM.setStyle(iframe, 'height', getWindowSize().h - (editorContainer.clientHeight - iframe.clientHeight));
|
||||
};
|
||||
var removeResize = function () {
|
||||
DOM.unbind(window, 'resize', resize);
|
||||
};
|
||||
editorContainer = editor.getContainer();
|
||||
editorContainerStyle = editorContainer.style;
|
||||
iframe = editor.getContentAreaContainer().firstChild;
|
||||
iframeStyle = iframe.style;
|
||||
if (!fullscreenInfo) {
|
||||
var newFullScreenInfo = {
|
||||
scrollPos: getScrollPos(),
|
||||
containerWidth: editorContainerStyle.width,
|
||||
containerHeight: editorContainerStyle.height,
|
||||
iframeWidth: iframeStyle.width,
|
||||
iframeHeight: iframeStyle.height,
|
||||
resizeHandler: resize,
|
||||
removeHandler: removeResize
|
||||
};
|
||||
iframeStyle.width = iframeStyle.height = '100%';
|
||||
editorContainerStyle.width = editorContainerStyle.height = '';
|
||||
DOM.addClass(body, 'mce-fullscreen');
|
||||
DOM.addClass(documentElement, 'mce-fullscreen');
|
||||
DOM.addClass(editorContainer, 'mce-fullscreen');
|
||||
DOM.bind(window, 'resize', resize);
|
||||
editor.on('remove', removeResize);
|
||||
resize();
|
||||
fullscreenState.set(newFullScreenInfo);
|
||||
$_i7kzec3jh8lpupz.fireFullscreenStateChanged(editor, true);
|
||||
} else {
|
||||
iframeStyle.width = fullscreenInfo.iframeWidth;
|
||||
iframeStyle.height = fullscreenInfo.iframeHeight;
|
||||
if (fullscreenInfo.containerWidth) {
|
||||
editorContainerStyle.width = fullscreenInfo.containerWidth;
|
||||
}
|
||||
if (fullscreenInfo.containerHeight) {
|
||||
editorContainerStyle.height = fullscreenInfo.containerHeight;
|
||||
}
|
||||
DOM.removeClass(body, 'mce-fullscreen');
|
||||
DOM.removeClass(documentElement, 'mce-fullscreen');
|
||||
DOM.removeClass(editorContainer, 'mce-fullscreen');
|
||||
setScrollPos(fullscreenInfo.scrollPos);
|
||||
DOM.unbind(window, 'resize', fullscreenInfo.resizeHandler);
|
||||
editor.off('remove', fullscreenInfo.removeHandler);
|
||||
fullscreenState.set(null);
|
||||
$_i7kzec3jh8lpupz.fireFullscreenStateChanged(editor, false);
|
||||
}
|
||||
};
|
||||
var $_971qctc1jh8lpupv = { toggleFullscreen: toggleFullscreen };
|
||||
|
||||
return {w: w, h: h};
|
||||
}
|
||||
var register = function (editor, fullscreenState) {
|
||||
editor.addCommand('mceFullScreen', function () {
|
||||
$_971qctc1jh8lpupv.toggleFullscreen(editor, fullscreenState);
|
||||
});
|
||||
};
|
||||
var $_7y4syjc0jh8lpupt = { register: register };
|
||||
|
||||
function toggleFullscreen() {
|
||||
var body = document.body, documentElement = document.documentElement, editorContainerStyle;
|
||||
var editorContainer, iframe, iframeStyle;
|
||||
var postRender = function (editor) {
|
||||
return function (e) {
|
||||
var ctrl = e.control;
|
||||
editor.on('FullscreenStateChanged', function (e) {
|
||||
ctrl.active(e.state);
|
||||
});
|
||||
};
|
||||
};
|
||||
var register$1 = function (editor) {
|
||||
editor.addMenuItem('fullscreen', {
|
||||
text: 'Fullscreen',
|
||||
shortcut: 'Ctrl+Shift+F',
|
||||
selectable: true,
|
||||
cmd: 'mceFullScreen',
|
||||
onPostRender: postRender(editor),
|
||||
context: 'view'
|
||||
});
|
||||
editor.addButton('fullscreen', {
|
||||
active: false,
|
||||
tooltip: 'Fullscreen',
|
||||
cmd: 'mceFullScreen',
|
||||
onPostRender: postRender(editor)
|
||||
});
|
||||
};
|
||||
var $_492blpc4jh8lpuq0 = { register: register$1 };
|
||||
|
||||
function resize() {
|
||||
DOM.setStyle(iframe, 'height', getWindowSize().h - (editorContainer.clientHeight - iframe.clientHeight));
|
||||
}
|
||||
global.add('fullscreen', function (editor) {
|
||||
var fullscreenState = Cell(null);
|
||||
if (editor.settings.inline) {
|
||||
return $_id7tbbzjh8lpupt.get(fullscreenState);
|
||||
}
|
||||
$_7y4syjc0jh8lpupt.register(editor, fullscreenState);
|
||||
$_492blpc4jh8lpuq0.register(editor);
|
||||
editor.addShortcut('Ctrl+Shift+F', '', 'mceFullScreen');
|
||||
return $_id7tbbzjh8lpupt.get(fullscreenState);
|
||||
});
|
||||
function Plugin () {
|
||||
}
|
||||
|
||||
fullscreenState = !fullscreenState;
|
||||
return Plugin;
|
||||
|
||||
editorContainer = editor.getContainer();
|
||||
editorContainerStyle = editorContainer.style;
|
||||
iframe = editor.getContentAreaContainer().firstChild;
|
||||
iframeStyle = iframe.style;
|
||||
|
||||
if (fullscreenState) {
|
||||
iframeWidth = iframeStyle.width;
|
||||
iframeHeight = iframeStyle.height;
|
||||
iframeStyle.width = iframeStyle.height = '100%';
|
||||
containerWidth = editorContainerStyle.width;
|
||||
containerHeight = editorContainerStyle.height;
|
||||
editorContainerStyle.width = editorContainerStyle.height = '';
|
||||
|
||||
DOM.addClass(body, 'mce-fullscreen');
|
||||
DOM.addClass(documentElement, 'mce-fullscreen');
|
||||
DOM.addClass(editorContainer, 'mce-fullscreen');
|
||||
|
||||
DOM.bind(window, 'resize', resize);
|
||||
resize();
|
||||
resizeHandler = resize;
|
||||
} else {
|
||||
iframeStyle.width = iframeWidth;
|
||||
iframeStyle.height = iframeHeight;
|
||||
|
||||
if (containerWidth) {
|
||||
editorContainerStyle.width = containerWidth;
|
||||
}
|
||||
|
||||
if (containerHeight) {
|
||||
editorContainerStyle.height = containerHeight;
|
||||
}
|
||||
|
||||
DOM.removeClass(body, 'mce-fullscreen');
|
||||
DOM.removeClass(documentElement, 'mce-fullscreen');
|
||||
DOM.removeClass(editorContainer, 'mce-fullscreen');
|
||||
DOM.unbind(window, 'resize', resizeHandler);
|
||||
}
|
||||
|
||||
editor.fire('FullscreenStateChanged', {state: fullscreenState});
|
||||
}
|
||||
|
||||
editor.on('init', function() {
|
||||
editor.addShortcut('Meta+Alt+F', '', toggleFullscreen);
|
||||
});
|
||||
|
||||
editor.on('remove', function() {
|
||||
if (resizeHandler) {
|
||||
DOM.unbind(window, 'resize', resizeHandler);
|
||||
}
|
||||
});
|
||||
|
||||
editor.addCommand('mceFullScreen', toggleFullscreen);
|
||||
|
||||
editor.addMenuItem('fullscreen', {
|
||||
text: 'Fullscreen',
|
||||
shortcut: 'Meta+Alt+F',
|
||||
selectable: true,
|
||||
onClick: toggleFullscreen,
|
||||
onPostRender: function() {
|
||||
var self = this;
|
||||
|
||||
editor.on('FullscreenStateChanged', function(e) {
|
||||
self.active(e.state);
|
||||
});
|
||||
},
|
||||
context: 'view'
|
||||
});
|
||||
|
||||
editor.addButton('fullscreen', {
|
||||
tooltip: 'Fullscreen',
|
||||
shortcut: 'Meta+Alt+F',
|
||||
onClick: toggleFullscreen,
|
||||
onPostRender: function() {
|
||||
var self = this;
|
||||
|
||||
editor.on('FullscreenStateChanged', function(e) {
|
||||
self.active(e.state);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
return {
|
||||
isFullscreen: function() {
|
||||
return fullscreenState;
|
||||
}
|
||||
};
|
||||
});
|
||||
}());
|
||||
})();
|
||||
|
||||
@@ -1 +1 @@
|
||||
tinymce.PluginManager.add("fullscreen",function(a){function b(){var a,b,c=window,d=document,e=d.body;return e.offsetWidth&&(a=e.offsetWidth,b=e.offsetHeight),c.innerWidth&&c.innerHeight&&(a=c.innerWidth,b=c.innerHeight),{w:a,h:b}}function c(){function c(){j.setStyle(m,"height",b().h-(l.clientHeight-m.clientHeight))}var k,l,m,n,o=document.body,p=document.documentElement;i=!i,l=a.getContainer(),k=l.style,m=a.getContentAreaContainer().firstChild,n=m.style,i?(d=n.width,e=n.height,n.width=n.height="100%",g=k.width,h=k.height,k.width=k.height="",j.addClass(o,"mce-fullscreen"),j.addClass(p,"mce-fullscreen"),j.addClass(l,"mce-fullscreen"),j.bind(window,"resize",c),c(),f=c):(n.width=d,n.height=e,g&&(k.width=g),h&&(k.height=h),j.removeClass(o,"mce-fullscreen"),j.removeClass(p,"mce-fullscreen"),j.removeClass(l,"mce-fullscreen"),j.unbind(window,"resize",f)),a.fire("FullscreenStateChanged",{state:i})}var d,e,f,g,h,i=!1,j=tinymce.DOM;return a.settings.inline?void 0:(a.on("init",function(){a.addShortcut("Meta+Alt+F","",c)}),a.on("remove",function(){f&&j.unbind(window,"resize",f)}),a.addCommand("mceFullScreen",c),a.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Meta+Alt+F",selectable:!0,onClick:c,onPostRender:function(){var b=this;a.on("FullscreenStateChanged",function(a){b.active(a.state)})},context:"view"}),a.addButton("fullscreen",{tooltip:"Fullscreen",shortcut:"Meta+Alt+F",onClick:c,onPostRender:function(){var b=this;a.on("FullscreenStateChanged",function(a){b.active(a.state)})}}),{isFullscreen:function(){return i}})});
|
||||
!function(){"use strict";var i=function(e){var n=e,t=function(){return n};return{get:t,set:function(e){n=e},clone:function(){return i(t())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(e){return{isFullscreen:function(){return null!==e.get()}}},n=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),m=function(e,n){e.fire("FullscreenStateChanged",{state:n})},g=n.DOM,r=function(e,n){var t,r,l,i,o,c,s=document.body,u=document.documentElement,d=n.get(),a=function(){var e,n,t,i;g.setStyle(l,"height",(t=window,i=document.body,i.offsetWidth&&(e=i.offsetWidth,n=i.offsetHeight),t.innerWidth&&t.innerHeight&&(e=t.innerWidth,n=t.innerHeight),{w:e,h:n}).h-(r.clientHeight-l.clientHeight))},h=function(){g.unbind(window,"resize",a)};if(t=(r=e.getContainer()).style,i=(l=e.getContentAreaContainer().firstChild).style,d)i.width=d.iframeWidth,i.height=d.iframeHeight,d.containerWidth&&(t.width=d.containerWidth),d.containerHeight&&(t.height=d.containerHeight),g.removeClass(s,"mce-fullscreen"),g.removeClass(u,"mce-fullscreen"),g.removeClass(r,"mce-fullscreen"),o=d.scrollPos,window.scrollTo(o.x,o.y),g.unbind(window,"resize",d.resizeHandler),e.off("remove",d.removeHandler),n.set(null),m(e,!1);else{var f={scrollPos:(c=g.getViewPort(),{x:c.x,y:c.y}),containerWidth:t.width,containerHeight:t.height,iframeWidth:i.width,iframeHeight:i.height,resizeHandler:a,removeHandler:h};i.width=i.height="100%",t.width=t.height="",g.addClass(s,"mce-fullscreen"),g.addClass(u,"mce-fullscreen"),g.addClass(r,"mce-fullscreen"),g.bind(window,"resize",a),e.on("remove",h),a(),n.set(f),m(e,!0)}},l=function(e,n){e.addCommand("mceFullScreen",function(){r(e,n)})},o=function(t){return function(e){var n=e.control;t.on("FullscreenStateChanged",function(e){n.active(e.state)})}},c=function(e){e.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Ctrl+Shift+F",selectable:!0,cmd:"mceFullScreen",onPostRender:o(e),context:"view"}),e.addButton("fullscreen",{active:!1,tooltip:"Fullscreen",cmd:"mceFullScreen",onPostRender:o(e)})};e.add("fullscreen",function(e){var n=i(null);return e.settings.inline||(l(e,n),c(e),e.addShortcut("Ctrl+Shift+F","","mceFullScreen")),t(n)})}();
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
@@ -0,0 +1,7 @@
|
||||
// Exports the "help" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/help')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/help'
|
||||
require('./plugin.js');
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -0,0 +1,7 @@
|
||||
// Exports the "hr" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/hr')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/hr'
|
||||
require('./plugin.js');
|
||||
@@ -1,30 +1,39 @@
|
||||
/**
|
||||
* plugin.js
|
||||
*
|
||||
* Copyright, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
(function () {
|
||||
var hr = (function () {
|
||||
'use strict';
|
||||
|
||||
/*global tinymce:true */
|
||||
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
||||
|
||||
tinymce.PluginManager.add('hr', function(editor) {
|
||||
editor.addCommand('InsertHorizontalRule', function() {
|
||||
editor.execCommand('mceInsertContent', false, '<hr />');
|
||||
});
|
||||
var register = function (editor) {
|
||||
editor.addCommand('InsertHorizontalRule', function () {
|
||||
editor.execCommand('mceInsertContent', false, '<hr />');
|
||||
});
|
||||
};
|
||||
var $_fvts64c7jh8lpuqd = { register: register };
|
||||
|
||||
editor.addButton('hr', {
|
||||
icon: 'hr',
|
||||
tooltip: 'Horizontal line',
|
||||
cmd: 'InsertHorizontalRule'
|
||||
});
|
||||
var register$1 = function (editor) {
|
||||
editor.addButton('hr', {
|
||||
icon: 'hr',
|
||||
tooltip: 'Horizontal line',
|
||||
cmd: 'InsertHorizontalRule'
|
||||
});
|
||||
editor.addMenuItem('hr', {
|
||||
icon: 'hr',
|
||||
text: 'Horizontal line',
|
||||
cmd: 'InsertHorizontalRule',
|
||||
context: 'insert'
|
||||
});
|
||||
};
|
||||
var $_fzoakwc8jh8lpuqe = { register: register$1 };
|
||||
|
||||
editor.addMenuItem('hr', {
|
||||
icon: 'hr',
|
||||
text: 'Horizontal line',
|
||||
cmd: 'InsertHorizontalRule',
|
||||
context: 'insert'
|
||||
});
|
||||
});
|
||||
global.add('hr', function (editor) {
|
||||
$_fvts64c7jh8lpuqd.register(editor);
|
||||
$_fzoakwc8jh8lpuqe.register(editor);
|
||||
});
|
||||
function Plugin () {
|
||||
}
|
||||
|
||||
return Plugin;
|
||||
|
||||
}());
|
||||
})();
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
tinymce.PluginManager.add("hr",function(a){a.addCommand("InsertHorizontalRule",function(){a.execCommand("mceInsertContent",!1,"<hr />")}),a.addButton("hr",{icon:"hr",tooltip:"Horizontal line",cmd:"InsertHorizontalRule"}),a.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})});
|
||||
!function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(n){n.addCommand("InsertHorizontalRule",function(){n.execCommand("mceInsertContent",!1,"<hr />")})},o=function(n){n.addButton("hr",{icon:"hr",tooltip:"Horizontal line",cmd:"InsertHorizontalRule"}),n.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})};n.add("hr",function(n){t(n),o(n)})}();
|
||||
@@ -0,0 +1,7 @@
|
||||
// Exports the "image" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/image')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/image'
|
||||
require('./plugin.js');
|
||||
File diff suppressed because it is too large
Load Diff
+1
-1
File diff suppressed because one or more lines are too long
@@ -0,0 +1,7 @@
|
||||
// Exports the "imagetools" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/imagetools')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/imagetools'
|
||||
require('./plugin.js');
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -0,0 +1,7 @@
|
||||
// Exports the "importcss" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/importcss')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/importcss'
|
||||
require('./plugin.js');
|
||||
@@ -1,195 +1,264 @@
|
||||
/**
|
||||
* plugin.js
|
||||
*
|
||||
* Copyright, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
(function () {
|
||||
var importcss = (function () {
|
||||
'use strict';
|
||||
|
||||
/*global tinymce:true */
|
||||
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
||||
|
||||
tinymce.PluginManager.add('importcss', function(editor) {
|
||||
var self = this, each = tinymce.each;
|
||||
var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
|
||||
|
||||
function compileFilter(filter) {
|
||||
if (typeof filter == "string") {
|
||||
return function(value) {
|
||||
return value.indexOf(filter) !== -1;
|
||||
};
|
||||
} else if (filter instanceof RegExp) {
|
||||
return function(value) {
|
||||
return filter.test(value);
|
||||
};
|
||||
}
|
||||
var global$2 = tinymce.util.Tools.resolve('tinymce.EditorManager');
|
||||
|
||||
return filter;
|
||||
}
|
||||
var global$3 = tinymce.util.Tools.resolve('tinymce.Env');
|
||||
|
||||
function getSelectors(doc, fileFilter) {
|
||||
var selectors = [], contentCSSUrls = {};
|
||||
var global$4 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
||||
|
||||
function append(styleSheet, imported) {
|
||||
var href = styleSheet.href, rules;
|
||||
var shouldMergeClasses = function (editor) {
|
||||
return editor.getParam('importcss_merge_classes');
|
||||
};
|
||||
var shouldImportExclusive = function (editor) {
|
||||
return editor.getParam('importcss_exclusive');
|
||||
};
|
||||
var getSelectorConverter = function (editor) {
|
||||
return editor.getParam('importcss_selector_converter');
|
||||
};
|
||||
var getSelectorFilter = function (editor) {
|
||||
return editor.getParam('importcss_selector_filter');
|
||||
};
|
||||
var getCssGroups = function (editor) {
|
||||
return editor.getParam('importcss_groups');
|
||||
};
|
||||
var shouldAppend = function (editor) {
|
||||
return editor.getParam('importcss_append');
|
||||
};
|
||||
var getFileFilter = function (editor) {
|
||||
return editor.getParam('importcss_file_filter');
|
||||
};
|
||||
var $_2w9p4lerjh8lpv3v = {
|
||||
shouldMergeClasses: shouldMergeClasses,
|
||||
shouldImportExclusive: shouldImportExclusive,
|
||||
getSelectorConverter: getSelectorConverter,
|
||||
getSelectorFilter: getSelectorFilter,
|
||||
getCssGroups: getCssGroups,
|
||||
shouldAppend: shouldAppend,
|
||||
getFileFilter: getFileFilter
|
||||
};
|
||||
|
||||
if (!href || !fileFilter(href, imported)) {
|
||||
return;
|
||||
}
|
||||
var removeCacheSuffix = function (url) {
|
||||
var cacheSuffix = global$3.cacheSuffix;
|
||||
if (typeof url === 'string') {
|
||||
url = url.replace('?' + cacheSuffix, '').replace('&' + cacheSuffix, '');
|
||||
}
|
||||
return url;
|
||||
};
|
||||
var isSkinContentCss = function (editor, href) {
|
||||
var settings = editor.settings, skin = settings.skin !== false ? settings.skin || 'lightgray' : false;
|
||||
if (skin) {
|
||||
var skinUrl = settings.skin_url ? editor.documentBaseURI.toAbsolute(settings.skin_url) : global$2.baseURL + '/skins/' + skin;
|
||||
return href === skinUrl + '/content' + (editor.inline ? '.inline' : '') + '.min.css';
|
||||
}
|
||||
return false;
|
||||
};
|
||||
var compileFilter = function (filter) {
|
||||
if (typeof filter === 'string') {
|
||||
return function (value) {
|
||||
return value.indexOf(filter) !== -1;
|
||||
};
|
||||
} else if (filter instanceof RegExp) {
|
||||
return function (value) {
|
||||
return filter.test(value);
|
||||
};
|
||||
}
|
||||
return filter;
|
||||
};
|
||||
var getSelectors = function (editor, doc, fileFilter) {
|
||||
var selectors = [], contentCSSUrls = {};
|
||||
function append(styleSheet, imported) {
|
||||
var href = styleSheet.href, rules;
|
||||
href = removeCacheSuffix(href);
|
||||
if (!href || !fileFilter(href, imported) || isSkinContentCss(editor, href)) {
|
||||
return;
|
||||
}
|
||||
global$4.each(styleSheet.imports, function (styleSheet) {
|
||||
append(styleSheet, true);
|
||||
});
|
||||
try {
|
||||
rules = styleSheet.cssRules || styleSheet.rules;
|
||||
} catch (e) {
|
||||
}
|
||||
global$4.each(rules, function (cssRule) {
|
||||
if (cssRule.styleSheet) {
|
||||
append(cssRule.styleSheet, true);
|
||||
} else if (cssRule.selectorText) {
|
||||
global$4.each(cssRule.selectorText.split(','), function (selector) {
|
||||
selectors.push(global$4.trim(selector));
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
global$4.each(editor.contentCSS, function (url) {
|
||||
contentCSSUrls[url] = true;
|
||||
});
|
||||
if (!fileFilter) {
|
||||
fileFilter = function (href, imported) {
|
||||
return imported || contentCSSUrls[href];
|
||||
};
|
||||
}
|
||||
try {
|
||||
global$4.each(doc.styleSheets, function (styleSheet) {
|
||||
append(styleSheet);
|
||||
});
|
||||
} catch (e) {
|
||||
}
|
||||
return selectors;
|
||||
};
|
||||
var defaultConvertSelectorToFormat = function (editor, selectorText) {
|
||||
var format;
|
||||
var selector = /^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(selectorText);
|
||||
if (!selector) {
|
||||
return;
|
||||
}
|
||||
var elementName = selector[1];
|
||||
var classes = selector[2].substr(1).split('.').join(' ');
|
||||
var inlineSelectorElements = global$4.makeMap('a,img');
|
||||
if (selector[1]) {
|
||||
format = { title: selectorText };
|
||||
if (editor.schema.getTextBlockElements()[elementName]) {
|
||||
format.block = elementName;
|
||||
} else if (editor.schema.getBlockElements()[elementName] || inlineSelectorElements[elementName.toLowerCase()]) {
|
||||
format.selector = elementName;
|
||||
} else {
|
||||
format.inline = elementName;
|
||||
}
|
||||
} else if (selector[2]) {
|
||||
format = {
|
||||
inline: 'span',
|
||||
title: selectorText.substr(1),
|
||||
classes: classes
|
||||
};
|
||||
}
|
||||
if ($_2w9p4lerjh8lpv3v.shouldMergeClasses(editor) !== false) {
|
||||
format.classes = classes;
|
||||
} else {
|
||||
format.attributes = { class: classes };
|
||||
}
|
||||
return format;
|
||||
};
|
||||
var getGroupsBySelector = function (groups, selector) {
|
||||
return global$4.grep(groups, function (group) {
|
||||
return !group.filter || group.filter(selector);
|
||||
});
|
||||
};
|
||||
var compileUserDefinedGroups = function (groups) {
|
||||
return global$4.map(groups, function (group) {
|
||||
return global$4.extend({}, group, {
|
||||
original: group,
|
||||
selectors: {},
|
||||
filter: compileFilter(group.filter),
|
||||
item: {
|
||||
text: group.title,
|
||||
menu: []
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
var isExclusiveMode = function (editor, group) {
|
||||
return group === null || $_2w9p4lerjh8lpv3v.shouldImportExclusive(editor) !== false;
|
||||
};
|
||||
var isUniqueSelector = function (editor, selector, group, globallyUniqueSelectors) {
|
||||
return !(isExclusiveMode(editor, group) ? selector in globallyUniqueSelectors : selector in group.selectors);
|
||||
};
|
||||
var markUniqueSelector = function (editor, selector, group, globallyUniqueSelectors) {
|
||||
if (isExclusiveMode(editor, group)) {
|
||||
globallyUniqueSelectors[selector] = true;
|
||||
} else {
|
||||
group.selectors[selector] = true;
|
||||
}
|
||||
};
|
||||
var convertSelectorToFormat = function (editor, plugin, selector, group) {
|
||||
var selectorConverter;
|
||||
if (group && group.selector_converter) {
|
||||
selectorConverter = group.selector_converter;
|
||||
} else if ($_2w9p4lerjh8lpv3v.getSelectorConverter(editor)) {
|
||||
selectorConverter = $_2w9p4lerjh8lpv3v.getSelectorConverter(editor);
|
||||
} else {
|
||||
selectorConverter = function () {
|
||||
return defaultConvertSelectorToFormat(editor, selector);
|
||||
};
|
||||
}
|
||||
return selectorConverter.call(plugin, selector, group);
|
||||
};
|
||||
var setup = function (editor) {
|
||||
editor.on('renderFormatsMenu', function (e) {
|
||||
var globallyUniqueSelectors = {};
|
||||
var selectorFilter = compileFilter($_2w9p4lerjh8lpv3v.getSelectorFilter(editor)), ctrl = e.control;
|
||||
var groups = compileUserDefinedGroups($_2w9p4lerjh8lpv3v.getCssGroups(editor));
|
||||
var processSelector = function (selector, group) {
|
||||
if (isUniqueSelector(editor, selector, group, globallyUniqueSelectors)) {
|
||||
markUniqueSelector(editor, selector, group, globallyUniqueSelectors);
|
||||
var format = convertSelectorToFormat(editor, editor.plugins.importcss, selector, group);
|
||||
if (format) {
|
||||
var formatName = format.name || global$1.DOM.uniqueId();
|
||||
editor.formatter.register(formatName, format);
|
||||
return global$4.extend({}, ctrl.settings.itemDefaults, {
|
||||
text: format.title,
|
||||
format: formatName
|
||||
});
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
if (!$_2w9p4lerjh8lpv3v.shouldAppend(editor)) {
|
||||
ctrl.items().remove();
|
||||
}
|
||||
global$4.each(getSelectors(editor, e.doc || editor.getDoc(), compileFilter($_2w9p4lerjh8lpv3v.getFileFilter(editor))), function (selector) {
|
||||
if (selector.indexOf('.mce-') === -1) {
|
||||
if (!selectorFilter || selectorFilter(selector)) {
|
||||
var selectorGroups = getGroupsBySelector(groups, selector);
|
||||
if (selectorGroups.length > 0) {
|
||||
global$4.each(selectorGroups, function (group) {
|
||||
var menuItem = processSelector(selector, group);
|
||||
if (menuItem) {
|
||||
group.item.menu.push(menuItem);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
var menuItem = processSelector(selector, null);
|
||||
if (menuItem) {
|
||||
ctrl.add(menuItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
global$4.each(groups, function (group) {
|
||||
if (group.item.menu.length > 0) {
|
||||
ctrl.add(group.item);
|
||||
}
|
||||
});
|
||||
e.control.renderNew();
|
||||
});
|
||||
};
|
||||
var $_9ayvw4emjh8lpv3q = {
|
||||
defaultConvertSelectorToFormat: defaultConvertSelectorToFormat,
|
||||
setup: setup
|
||||
};
|
||||
|
||||
each(styleSheet.imports, function(styleSheet) {
|
||||
append(styleSheet, true);
|
||||
});
|
||||
var get = function (editor) {
|
||||
var convertSelectorToFormat = function (selectorText) {
|
||||
return $_9ayvw4emjh8lpv3q.defaultConvertSelectorToFormat(editor, selectorText);
|
||||
};
|
||||
return { convertSelectorToFormat: convertSelectorToFormat };
|
||||
};
|
||||
var $_5soyhmeljh8lpv3o = { get: get };
|
||||
|
||||
try {
|
||||
rules = styleSheet.cssRules || styleSheet.rules;
|
||||
} catch (e) {
|
||||
// Firefox fails on rules to remote domain for example:
|
||||
// @import url(//fonts.googleapis.com/css?family=Pathway+Gothic+One);
|
||||
}
|
||||
global.add('importcss', function (editor) {
|
||||
$_9ayvw4emjh8lpv3q.setup(editor);
|
||||
return $_5soyhmeljh8lpv3o.get(editor);
|
||||
});
|
||||
function Plugin () {
|
||||
}
|
||||
|
||||
each(rules, function(cssRule) {
|
||||
if (cssRule.styleSheet) {
|
||||
append(cssRule.styleSheet, true);
|
||||
} else if (cssRule.selectorText) {
|
||||
each(cssRule.selectorText.split(','), function(selector) {
|
||||
selectors.push(tinymce.trim(selector));
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
return Plugin;
|
||||
|
||||
each(editor.contentCSS, function(url) {
|
||||
contentCSSUrls[url] = true;
|
||||
});
|
||||
|
||||
if (!fileFilter) {
|
||||
fileFilter = function(href, imported) {
|
||||
return imported || contentCSSUrls[href];
|
||||
};
|
||||
}
|
||||
|
||||
try {
|
||||
each(doc.styleSheets, function(styleSheet) {
|
||||
append(styleSheet);
|
||||
});
|
||||
} catch (e) {}
|
||||
|
||||
return selectors;
|
||||
}
|
||||
|
||||
function convertSelectorToFormat(selectorText) {
|
||||
var format;
|
||||
|
||||
// Parse simple element.class1, .class1
|
||||
var selector = /^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(selectorText);
|
||||
if (!selector) {
|
||||
return;
|
||||
}
|
||||
|
||||
var elementName = selector[1];
|
||||
var classes = selector[2].substr(1).split('.').join(' ');
|
||||
var inlineSelectorElements = tinymce.makeMap('a,img');
|
||||
|
||||
// element.class - Produce block formats
|
||||
if (selector[1]) {
|
||||
format = {
|
||||
title: selectorText
|
||||
};
|
||||
|
||||
if (editor.schema.getTextBlockElements()[elementName]) {
|
||||
// Text block format ex: h1.class1
|
||||
format.block = elementName;
|
||||
} else if (editor.schema.getBlockElements()[elementName] || inlineSelectorElements[elementName.toLowerCase()]) {
|
||||
// Block elements such as table.class and special inline elements such as a.class or img.class
|
||||
format.selector = elementName;
|
||||
} else {
|
||||
// Inline format strong.class1
|
||||
format.inline = elementName;
|
||||
}
|
||||
} else if (selector[2]) {
|
||||
// .class - Produce inline span with classes
|
||||
format = {
|
||||
inline: 'span',
|
||||
title: selectorText.substr(1),
|
||||
classes: classes
|
||||
};
|
||||
}
|
||||
|
||||
// Append to or override class attribute
|
||||
if (editor.settings.importcss_merge_classes !== false) {
|
||||
format.classes = classes;
|
||||
} else {
|
||||
format.attributes = {"class": classes};
|
||||
}
|
||||
|
||||
return format;
|
||||
}
|
||||
|
||||
editor.on('renderFormatsMenu', function(e) {
|
||||
var settings = editor.settings, selectors = {};
|
||||
var selectorConverter = settings.importcss_selector_converter || convertSelectorToFormat;
|
||||
var selectorFilter = compileFilter(settings.importcss_selector_filter), ctrl = e.control;
|
||||
|
||||
if (!editor.settings.importcss_append) {
|
||||
ctrl.items().remove();
|
||||
}
|
||||
|
||||
// Setup new groups collection by cloning the configured one
|
||||
var groups = [];
|
||||
tinymce.each(settings.importcss_groups, function(group) {
|
||||
group = tinymce.extend({}, group);
|
||||
group.filter = compileFilter(group.filter);
|
||||
groups.push(group);
|
||||
});
|
||||
|
||||
each(getSelectors(e.doc || editor.getDoc(), compileFilter(settings.importcss_file_filter)), function(selector) {
|
||||
if (selector.indexOf('.mce-') === -1) {
|
||||
if (!selectors[selector] && (!selectorFilter || selectorFilter(selector))) {
|
||||
var format = selectorConverter.call(self, selector), menu;
|
||||
|
||||
if (format) {
|
||||
var formatName = format.name || tinymce.DOM.uniqueId();
|
||||
|
||||
if (groups) {
|
||||
for (var i = 0; i < groups.length; i++) {
|
||||
if (!groups[i].filter || groups[i].filter(selector)) {
|
||||
if (!groups[i].item) {
|
||||
groups[i].item = {text: groups[i].title, menu: []};
|
||||
}
|
||||
|
||||
menu = groups[i].item.menu;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
editor.formatter.register(formatName, format);
|
||||
|
||||
var menuItem = tinymce.extend({}, ctrl.settings.itemDefaults, {
|
||||
text: format.title,
|
||||
format: formatName
|
||||
});
|
||||
|
||||
if (menu) {
|
||||
menu.push(menuItem);
|
||||
} else {
|
||||
ctrl.add(menuItem);
|
||||
}
|
||||
}
|
||||
|
||||
selectors[selector] = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
each(groups, function(group) {
|
||||
ctrl.add(group.item);
|
||||
});
|
||||
|
||||
e.control.renderNew();
|
||||
});
|
||||
|
||||
// Expose default convertSelectorToFormat implementation
|
||||
self.convertSelectorToFormat = convertSelectorToFormat;
|
||||
});
|
||||
}());
|
||||
})();
|
||||
|
||||
@@ -1 +1 @@
|
||||
tinymce.PluginManager.add("importcss",function(a){function b(a){return"string"==typeof a?function(b){return-1!==b.indexOf(a)}:a instanceof RegExp?function(b){return a.test(b)}:a}function c(b,c){function d(a,b){var g,h=a.href;if(h&&c(h,b)){f(a.imports,function(a){d(a,!0)});try{g=a.cssRules||a.rules}catch(i){}f(g,function(a){a.styleSheet?d(a.styleSheet,!0):a.selectorText&&f(a.selectorText.split(","),function(a){e.push(tinymce.trim(a))})})}}var e=[],g={};f(a.contentCSS,function(a){g[a]=!0}),c||(c=function(a,b){return b||g[a]});try{f(b.styleSheets,function(a){d(a)})}catch(h){}return e}function d(b){var c,d=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(b);if(d){var e=d[1],f=d[2].substr(1).split(".").join(" "),g=tinymce.makeMap("a,img");return d[1]?(c={title:b},a.schema.getTextBlockElements()[e]?c.block=e:a.schema.getBlockElements()[e]||g[e.toLowerCase()]?c.selector=e:c.inline=e):d[2]&&(c={inline:"span",title:b.substr(1),classes:f}),a.settings.importcss_merge_classes!==!1?c.classes=f:c.attributes={"class":f},c}}var e=this,f=tinymce.each;a.on("renderFormatsMenu",function(g){var h=a.settings,i={},j=h.importcss_selector_converter||d,k=b(h.importcss_selector_filter),l=g.control;a.settings.importcss_append||l.items().remove();var m=[];tinymce.each(h.importcss_groups,function(a){a=tinymce.extend({},a),a.filter=b(a.filter),m.push(a)}),f(c(g.doc||a.getDoc(),b(h.importcss_file_filter)),function(b){if(-1===b.indexOf(".mce-")&&!i[b]&&(!k||k(b))){var c,d=j.call(e,b);if(d){var f=d.name||tinymce.DOM.uniqueId();if(m)for(var g=0;g<m.length;g++)if(!m[g].filter||m[g].filter(b)){m[g].item||(m[g].item={text:m[g].title,menu:[]}),c=m[g].item.menu;break}a.formatter.register(f,d);var h=tinymce.extend({},l.settings.itemDefaults,{text:d.title,format:f});c?c.push(h):l.add(h)}i[b]=!0}}),f(m,function(a){l.add(a.item)}),g.control.renderNew()}),e.convertSelectorToFormat=d});
|
||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),d=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),v=tinymce.util.Tools.resolve("tinymce.EditorManager"),h=tinymce.util.Tools.resolve("tinymce.Env"),y=tinymce.util.Tools.resolve("tinymce.util.Tools"),o=function(e){return e.getParam("importcss_merge_classes")},n=function(e){return e.getParam("importcss_exclusive")},_=function(e){return e.getParam("importcss_selector_converter")},r=function(e){return e.getParam("importcss_selector_filter")},i=function(e){return e.getParam("importcss_groups")},u=function(e){return e.getParam("importcss_append")},l=function(e){return e.getParam("importcss_file_filter")},a=function(t){return"string"==typeof t?function(e){return-1!==e.indexOf(t)}:t instanceof RegExp?function(e){return t.test(e)}:t},f=function(f,e,m){var g=[],n={};function p(e,t){var n,r,i,c=e.href;if(r=c,i=h.cacheSuffix,"string"==typeof r&&(r=r.replace("?"+i,"").replace("&"+i,"")),(c=r)&&m(c,t)&&(o=c,u=(s=f).settings,!(l=!1!==u.skin&&(u.skin||"lightgray"))||o!==(u.skin_url?s.documentBaseURI.toAbsolute(u.skin_url):v.baseURL+"/skins/"+l)+"/content"+(s.inline?".inline":"")+".min.css")){var s,o,u,l;y.each(e.imports,function(e){p(e,!0)});try{n=e.cssRules||e.rules}catch(a){}y.each(n,function(e){e.styleSheet?p(e.styleSheet,!0):e.selectorText&&y.each(e.selectorText.split(","),function(e){g.push(y.trim(e))})})}}y.each(f.contentCSS,function(e){n[e]=!0}),m||(m=function(e,t){return t||n[e]});try{y.each(e.styleSheets,function(e){p(e)})}catch(t){}return g},x=function(e,t){var n,r=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(t);if(r){var i=r[1],c=r[2].substr(1).split(".").join(" "),s=y.makeMap("a,img");return r[1]?(n={title:t},e.schema.getTextBlockElements()[i]?n.block=i:e.schema.getBlockElements()[i]||s[i.toLowerCase()]?n.selector=i:n.inline=i):r[2]&&(n={inline:"span",title:t.substr(1),classes:c}),!1!==o(e)?n.classes=c:n.attributes={"class":c},n}},T=function(e,t){return null===t||!1!==n(e)},c=x,t=function(h){h.on("renderFormatsMenu",function(e){var t,p={},c=a(r(h)),v=e.control,s=(t=i(h),y.map(t,function(e){return y.extend({},e,{original:e,selectors:{},filter:a(e.filter),item:{text:e.title,menu:[]}})})),o=function(e,t){if(f=e,g=p,!(T(h,m=t)?f in g:f in m.selectors)){u=e,a=p,T(h,l=t)?a[u]=!0:l.selectors[u]=!0;var n=(c=(i=h).plugins.importcss,s=e,((o=t)&&o.selector_converter?o.selector_converter:_(i)?_(i):function(){return x(i,s)}).call(c,s,o));if(n){var r=n.name||d.DOM.uniqueId();return h.formatter.register(r,n),y.extend({},v.settings.itemDefaults,{text:n.title,format:r})}}var i,c,s,o,u,l,a,f,m,g;return null};u(h)||v.items().remove(),y.each(f(h,e.doc||h.getDoc(),a(l(h))),function(n){if(-1===n.indexOf(".mce-")&&(!c||c(n))){var e=(r=s,i=n,y.grep(r,function(e){return!e.filter||e.filter(i)}));if(0<e.length)y.each(e,function(e){var t=o(n,e);t&&e.item.menu.push(t)});else{var t=o(n,null);t&&v.add(t)}}var r,i}),y.each(s,function(e){0<e.item.menu.length&&v.add(e.item)}),e.control.renderNew()})},s=function(t){return{convertSelectorToFormat:function(e){return c(t,e)}}};e.add("importcss",function(e){return t(e),s(e)})}();
|
||||
@@ -0,0 +1,7 @@
|
||||
// Exports the "insertdatetime" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/insertdatetime')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/insertdatetime'
|
||||
require('./plugin.js');
|
||||
@@ -1,121 +1,173 @@
|
||||
/**
|
||||
* plugin.js
|
||||
*
|
||||
* Copyright, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
(function () {
|
||||
var insertdatetime = (function () {
|
||||
'use strict';
|
||||
|
||||
/*global tinymce:true */
|
||||
var Cell = function (initial) {
|
||||
var value = initial;
|
||||
var get = function () {
|
||||
return value;
|
||||
};
|
||||
var set = function (v) {
|
||||
value = v;
|
||||
};
|
||||
var clone = function () {
|
||||
return Cell(get());
|
||||
};
|
||||
return {
|
||||
get: get,
|
||||
set: set,
|
||||
clone: clone
|
||||
};
|
||||
};
|
||||
|
||||
tinymce.PluginManager.add('insertdatetime', function(editor) {
|
||||
var daysShort = "Sun Mon Tue Wed Thu Fri Sat Sun".split(' ');
|
||||
var daysLong = "Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(' ');
|
||||
var monthsShort = "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(' ');
|
||||
var monthsLong = "January February March April May June July August September October November December".split(' ');
|
||||
var menuItems = [], lastFormat, defaultButtonTimeFormat;
|
||||
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
||||
|
||||
function getDateTime(fmt, date) {
|
||||
function addZeros(value, len) {
|
||||
value = "" + value;
|
||||
var getDateFormat = function (editor) {
|
||||
return editor.getParam('insertdatetime_dateformat', editor.translate('%Y-%m-%d'));
|
||||
};
|
||||
var getTimeFormat = function (editor) {
|
||||
return editor.getParam('insertdatetime_timeformat', editor.translate('%H:%M:%S'));
|
||||
};
|
||||
var getFormats = function (editor) {
|
||||
return editor.getParam('insertdatetime_formats', [
|
||||
'%H:%M:%S',
|
||||
'%Y-%m-%d',
|
||||
'%I:%M:%S %p',
|
||||
'%D'
|
||||
]);
|
||||
};
|
||||
var getDefaultDateTime = function (editor) {
|
||||
var formats = getFormats(editor);
|
||||
return formats.length > 0 ? formats[0] : getTimeFormat(editor);
|
||||
};
|
||||
var shouldInsertTimeElement = function (editor) {
|
||||
return editor.getParam('insertdatetime_element', false);
|
||||
};
|
||||
var $_7ti1jkewjh8lpv4i = {
|
||||
getDateFormat: getDateFormat,
|
||||
getTimeFormat: getTimeFormat,
|
||||
getFormats: getFormats,
|
||||
getDefaultDateTime: getDefaultDateTime,
|
||||
shouldInsertTimeElement: shouldInsertTimeElement
|
||||
};
|
||||
|
||||
if (value.length < len) {
|
||||
for (var i = 0; i < (len - value.length); i++) {
|
||||
value = "0" + value;
|
||||
}
|
||||
}
|
||||
var daysShort = 'Sun Mon Tue Wed Thu Fri Sat Sun'.split(' ');
|
||||
var daysLong = 'Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday'.split(' ');
|
||||
var monthsShort = 'Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec'.split(' ');
|
||||
var monthsLong = 'January February March April May June July August September October November December'.split(' ');
|
||||
var addZeros = function (value, len) {
|
||||
value = '' + value;
|
||||
if (value.length < len) {
|
||||
for (var i = 0; i < len - value.length; i++) {
|
||||
value = '0' + value;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
var getDateTime = function (editor, fmt, date) {
|
||||
date = date || new Date();
|
||||
fmt = fmt.replace('%D', '%m/%d/%Y');
|
||||
fmt = fmt.replace('%r', '%I:%M:%S %p');
|
||||
fmt = fmt.replace('%Y', '' + date.getFullYear());
|
||||
fmt = fmt.replace('%y', '' + date.getYear());
|
||||
fmt = fmt.replace('%m', addZeros(date.getMonth() + 1, 2));
|
||||
fmt = fmt.replace('%d', addZeros(date.getDate(), 2));
|
||||
fmt = fmt.replace('%H', '' + addZeros(date.getHours(), 2));
|
||||
fmt = fmt.replace('%M', '' + addZeros(date.getMinutes(), 2));
|
||||
fmt = fmt.replace('%S', '' + addZeros(date.getSeconds(), 2));
|
||||
fmt = fmt.replace('%I', '' + ((date.getHours() + 11) % 12 + 1));
|
||||
fmt = fmt.replace('%p', '' + (date.getHours() < 12 ? 'AM' : 'PM'));
|
||||
fmt = fmt.replace('%B', '' + editor.translate(monthsLong[date.getMonth()]));
|
||||
fmt = fmt.replace('%b', '' + editor.translate(monthsShort[date.getMonth()]));
|
||||
fmt = fmt.replace('%A', '' + editor.translate(daysLong[date.getDay()]));
|
||||
fmt = fmt.replace('%a', '' + editor.translate(daysShort[date.getDay()]));
|
||||
fmt = fmt.replace('%%', '%');
|
||||
return fmt;
|
||||
};
|
||||
var updateElement = function (editor, timeElm, computerTime, userTime) {
|
||||
var newTimeElm = editor.dom.create('time', { datetime: computerTime }, userTime);
|
||||
timeElm.parentNode.insertBefore(newTimeElm, timeElm);
|
||||
editor.dom.remove(timeElm);
|
||||
editor.selection.select(newTimeElm, true);
|
||||
editor.selection.collapse(false);
|
||||
};
|
||||
var insertDateTime = function (editor, format) {
|
||||
if ($_7ti1jkewjh8lpv4i.shouldInsertTimeElement(editor)) {
|
||||
var userTime = getDateTime(editor, format);
|
||||
var computerTime = void 0;
|
||||
if (/%[HMSIp]/.test(format)) {
|
||||
computerTime = getDateTime(editor, '%Y-%m-%dT%H:%M');
|
||||
} else {
|
||||
computerTime = getDateTime(editor, '%Y-%m-%d');
|
||||
}
|
||||
var timeElm = editor.dom.getParent(editor.selection.getStart(), 'time');
|
||||
if (timeElm) {
|
||||
updateElement(editor, timeElm, computerTime, userTime);
|
||||
} else {
|
||||
editor.insertContent('<time datetime="' + computerTime + '">' + userTime + '</time>');
|
||||
}
|
||||
} else {
|
||||
editor.insertContent(getDateTime(editor, format));
|
||||
}
|
||||
};
|
||||
var $_f8xhysexjh8lpv4k = {
|
||||
insertDateTime: insertDateTime,
|
||||
getDateTime: getDateTime
|
||||
};
|
||||
|
||||
return value;
|
||||
}
|
||||
var register = function (editor) {
|
||||
editor.addCommand('mceInsertDate', function () {
|
||||
$_f8xhysexjh8lpv4k.insertDateTime(editor, $_7ti1jkewjh8lpv4i.getDateFormat(editor));
|
||||
});
|
||||
editor.addCommand('mceInsertTime', function () {
|
||||
$_f8xhysexjh8lpv4k.insertDateTime(editor, $_7ti1jkewjh8lpv4i.getTimeFormat(editor));
|
||||
});
|
||||
};
|
||||
var $_3klk7oevjh8lpv4h = { register: register };
|
||||
|
||||
date = date || new Date();
|
||||
var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
||||
|
||||
fmt = fmt.replace("%D", "%m/%d/%Y");
|
||||
fmt = fmt.replace("%r", "%I:%M:%S %p");
|
||||
fmt = fmt.replace("%Y", "" + date.getFullYear());
|
||||
fmt = fmt.replace("%y", "" + date.getYear());
|
||||
fmt = fmt.replace("%m", addZeros(date.getMonth() + 1, 2));
|
||||
fmt = fmt.replace("%d", addZeros(date.getDate(), 2));
|
||||
fmt = fmt.replace("%H", "" + addZeros(date.getHours(), 2));
|
||||
fmt = fmt.replace("%M", "" + addZeros(date.getMinutes(), 2));
|
||||
fmt = fmt.replace("%S", "" + addZeros(date.getSeconds(), 2));
|
||||
fmt = fmt.replace("%I", "" + ((date.getHours() + 11) % 12 + 1));
|
||||
fmt = fmt.replace("%p", "" + (date.getHours() < 12 ? "AM" : "PM"));
|
||||
fmt = fmt.replace("%B", "" + editor.translate(monthsLong[date.getMonth()]));
|
||||
fmt = fmt.replace("%b", "" + editor.translate(monthsShort[date.getMonth()]));
|
||||
fmt = fmt.replace("%A", "" + editor.translate(daysLong[date.getDay()]));
|
||||
fmt = fmt.replace("%a", "" + editor.translate(daysShort[date.getDay()]));
|
||||
fmt = fmt.replace("%%", "%");
|
||||
var createMenuItems = function (editor, lastFormatState) {
|
||||
var formats = $_7ti1jkewjh8lpv4i.getFormats(editor);
|
||||
return global$1.map(formats, function (fmt) {
|
||||
return {
|
||||
text: $_f8xhysexjh8lpv4k.getDateTime(editor, fmt),
|
||||
onclick: function () {
|
||||
lastFormatState.set(fmt);
|
||||
$_f8xhysexjh8lpv4k.insertDateTime(editor, fmt);
|
||||
}
|
||||
};
|
||||
});
|
||||
};
|
||||
var register$1 = function (editor, lastFormatState) {
|
||||
var menuItems = createMenuItems(editor, lastFormatState);
|
||||
editor.addButton('insertdatetime', {
|
||||
type: 'splitbutton',
|
||||
title: 'Insert date/time',
|
||||
menu: menuItems,
|
||||
onclick: function () {
|
||||
var lastFormat = lastFormatState.get();
|
||||
$_f8xhysexjh8lpv4k.insertDateTime(editor, lastFormat ? lastFormat : $_7ti1jkewjh8lpv4i.getDefaultDateTime(editor));
|
||||
}
|
||||
});
|
||||
editor.addMenuItem('insertdatetime', {
|
||||
icon: 'date',
|
||||
text: 'Date/time',
|
||||
menu: menuItems,
|
||||
context: 'insert'
|
||||
});
|
||||
};
|
||||
var $_7myfffeyjh8lpv4n = { register: register$1 };
|
||||
|
||||
return fmt;
|
||||
}
|
||||
global.add('insertdatetime', function (editor) {
|
||||
var lastFormatState = Cell(null);
|
||||
$_3klk7oevjh8lpv4h.register(editor);
|
||||
$_7myfffeyjh8lpv4n.register(editor, lastFormatState);
|
||||
});
|
||||
function Plugin () {
|
||||
}
|
||||
|
||||
function insertDateTime(format) {
|
||||
var html = getDateTime(format);
|
||||
return Plugin;
|
||||
|
||||
if (editor.settings.insertdatetime_element) {
|
||||
var computerTime;
|
||||
|
||||
if (/%[HMSIp]/.test(format)) {
|
||||
computerTime = getDateTime("%Y-%m-%dT%H:%M");
|
||||
} else {
|
||||
computerTime = getDateTime("%Y-%m-%d");
|
||||
}
|
||||
|
||||
html = '<time datetime="' + computerTime + '">' + html + '</time>';
|
||||
|
||||
var timeElm = editor.dom.getParent(editor.selection.getStart(), 'time');
|
||||
if (timeElm) {
|
||||
editor.dom.setOuterHTML(timeElm, html);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
editor.insertContent(html);
|
||||
}
|
||||
|
||||
editor.addCommand('mceInsertDate', function() {
|
||||
insertDateTime(editor.getParam("insertdatetime_dateformat", editor.translate("%Y-%m-%d")));
|
||||
});
|
||||
|
||||
editor.addCommand('mceInsertTime', function() {
|
||||
insertDateTime(editor.getParam("insertdatetime_timeformat", editor.translate('%H:%M:%S')));
|
||||
});
|
||||
|
||||
editor.addButton('insertdatetime', {
|
||||
type: 'splitbutton',
|
||||
title: 'Insert date/time',
|
||||
onclick: function() {
|
||||
insertDateTime(lastFormat || defaultButtonTimeFormat);
|
||||
},
|
||||
menu: menuItems
|
||||
});
|
||||
|
||||
tinymce.each(editor.settings.insertdatetime_formats || [
|
||||
"%H:%M:%S",
|
||||
"%Y-%m-%d",
|
||||
"%I:%M:%S %p",
|
||||
"%D"
|
||||
], function(fmt) {
|
||||
if (!defaultButtonTimeFormat) {
|
||||
defaultButtonTimeFormat = fmt;
|
||||
}
|
||||
|
||||
menuItems.push({
|
||||
text: getDateTime(fmt),
|
||||
onclick: function() {
|
||||
lastFormat = fmt;
|
||||
insertDateTime(fmt);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
editor.addMenuItem('insertdatetime', {
|
||||
icon: 'date',
|
||||
text: 'Insert date/time',
|
||||
menu: menuItems,
|
||||
context: 'insert'
|
||||
});
|
||||
});
|
||||
}());
|
||||
})();
|
||||
|
||||
@@ -1 +1 @@
|
||||
tinymce.PluginManager.add("insertdatetime",function(a){function b(b,c){function d(a,b){if(a=""+a,a.length<b)for(var c=0;c<b-a.length;c++)a="0"+a;return a}return c=c||new Date,b=b.replace("%D","%m/%d/%Y"),b=b.replace("%r","%I:%M:%S %p"),b=b.replace("%Y",""+c.getFullYear()),b=b.replace("%y",""+c.getYear()),b=b.replace("%m",d(c.getMonth()+1,2)),b=b.replace("%d",d(c.getDate(),2)),b=b.replace("%H",""+d(c.getHours(),2)),b=b.replace("%M",""+d(c.getMinutes(),2)),b=b.replace("%S",""+d(c.getSeconds(),2)),b=b.replace("%I",""+((c.getHours()+11)%12+1)),b=b.replace("%p",""+(c.getHours()<12?"AM":"PM")),b=b.replace("%B",""+a.translate(i[c.getMonth()])),b=b.replace("%b",""+a.translate(h[c.getMonth()])),b=b.replace("%A",""+a.translate(g[c.getDay()])),b=b.replace("%a",""+a.translate(f[c.getDay()])),b=b.replace("%%","%")}function c(c){var d=b(c);if(a.settings.insertdatetime_element){var e;e=b(/%[HMSIp]/.test(c)?"%Y-%m-%dT%H:%M":"%Y-%m-%d"),d='<time datetime="'+e+'">'+d+"</time>";var f=a.dom.getParent(a.selection.getStart(),"time");if(f)return void a.dom.setOuterHTML(f,d)}a.insertContent(d)}var d,e,f="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),g="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),h="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),i="January February March April May June July August September October November December".split(" "),j=[];a.addCommand("mceInsertDate",function(){c(a.getParam("insertdatetime_dateformat",a.translate("%Y-%m-%d")))}),a.addCommand("mceInsertTime",function(){c(a.getParam("insertdatetime_timeformat",a.translate("%H:%M:%S")))}),a.addButton("insertdatetime",{type:"splitbutton",title:"Insert date/time",onclick:function(){c(d||e)},menu:j}),tinymce.each(a.settings.insertdatetime_formats||["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"],function(a){e||(e=a),j.push({text:b(a),onclick:function(){d=a,c(a)}})}),a.addMenuItem("insertdatetime",{icon:"date",text:"Insert date/time",menu:j,context:"insert"})});
|
||||
!function(){"use strict";var r=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return r(n())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(e){return e.getParam("insertdatetime_timeformat",e.translate("%H:%M:%S"))},a=function(e){return e.getParam("insertdatetime_formats",["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"])},t=function(e){return e.getParam("insertdatetime_dateformat",e.translate("%Y-%m-%d"))},i=n,o=a,u=function(e){var t=a(e);return 0<t.length?t[0]:n(e)},m=function(e){return e.getParam("insertdatetime_element",!1)},c="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),l="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),s="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),d="January February March April May June July August September October November December".split(" "),p=function(e,t){if((e=""+e).length<t)for(var n=0;n<t-e.length;n++)e="0"+e;return e},f=function(e,t,n){return n=n||new Date,t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+n.getFullYear())).replace("%y",""+n.getYear())).replace("%m",p(n.getMonth()+1,2))).replace("%d",p(n.getDate(),2))).replace("%H",""+p(n.getHours(),2))).replace("%M",""+p(n.getMinutes(),2))).replace("%S",""+p(n.getSeconds(),2))).replace("%I",""+((n.getHours()+11)%12+1))).replace("%p",n.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(d[n.getMonth()]))).replace("%b",""+e.translate(s[n.getMonth()]))).replace("%A",""+e.translate(l[n.getDay()]))).replace("%a",""+e.translate(c[n.getDay()]))).replace("%%","%")},g=function(e,t){if(m(e)){var n=f(e,t),r=void 0;r=/%[HMSIp]/.test(t)?f(e,"%Y-%m-%dT%H:%M"):f(e,"%Y-%m-%d");var a=e.dom.getParent(e.selection.getStart(),"time");a?(o=a,u=r,c=n,l=(i=e).dom.create("time",{datetime:u},c),o.parentNode.insertBefore(l,o),i.dom.remove(o),i.selection.select(l,!0),i.selection.collapse(!1)):e.insertContent('<time datetime="'+r+'">'+n+"</time>")}else e.insertContent(f(e,t));var i,o,u,c,l},y=f,M=function(e){e.addCommand("mceInsertDate",function(){g(e,t(e))}),e.addCommand("mceInsertTime",function(){g(e,i(e))})},v=tinymce.util.Tools.resolve("tinymce.util.Tools"),S=function(t,n){var r,a,e,i=(a=n,e=o(r=t),v.map(e,function(e){return{text:y(r,e),onclick:function(){a.set(e),g(r,e)}}}));t.addButton("insertdatetime",{type:"splitbutton",title:"Insert date/time",menu:i,onclick:function(){var e=n.get();g(t,e||u(t))}}),t.addMenuItem("insertdatetime",{icon:"date",text:"Date/time",menu:i,context:"insert"})};e.add("insertdatetime",function(e){var t=r(null);M(e),S(e,t)})}();
|
||||
@@ -0,0 +1,7 @@
|
||||
// Exports the "legacyoutput" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/legacyoutput')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/legacyoutput'
|
||||
require('./plugin.js');
|
||||
@@ -1,211 +1,220 @@
|
||||
/**
|
||||
* plugin.js
|
||||
*
|
||||
* Copyright, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*
|
||||
* This plugin will force TinyMCE to produce deprecated legacy output such as font elements, u elements, align
|
||||
* attributes and so forth. There are a few cases where these old items might be needed for example in email applications or with Flash
|
||||
*
|
||||
* However you should NOT use this plugin if you are building some system that produces web contents such as a CMS. All these elements are
|
||||
* not apart of the newer specifications for HTML and XHTML.
|
||||
*/
|
||||
(function () {
|
||||
var legacyoutput = (function () {
|
||||
'use strict';
|
||||
|
||||
/*global tinymce:true */
|
||||
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
||||
|
||||
(function(tinymce) {
|
||||
// Override inline_styles setting to force TinyMCE to produce deprecated contents
|
||||
tinymce.on('AddEditor', function(e) {
|
||||
e.editor.settings.inline_styles = false;
|
||||
});
|
||||
var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
||||
|
||||
tinymce.PluginManager.add('legacyoutput', function(editor, url, $) {
|
||||
editor.on('init', function() {
|
||||
var alignElements = 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img',
|
||||
fontSizes = tinymce.explode(editor.settings.font_size_style_values),
|
||||
schema = editor.schema;
|
||||
var overrideFormats = function (editor) {
|
||||
var alignElements = 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', fontSizes = global$1.explode(editor.settings.font_size_style_values), schema = editor.schema;
|
||||
editor.formatter.register({
|
||||
alignleft: {
|
||||
selector: alignElements,
|
||||
attributes: { align: 'left' }
|
||||
},
|
||||
aligncenter: {
|
||||
selector: alignElements,
|
||||
attributes: { align: 'center' }
|
||||
},
|
||||
alignright: {
|
||||
selector: alignElements,
|
||||
attributes: { align: 'right' }
|
||||
},
|
||||
alignjustify: {
|
||||
selector: alignElements,
|
||||
attributes: { align: 'justify' }
|
||||
},
|
||||
bold: [
|
||||
{
|
||||
inline: 'b',
|
||||
remove: 'all'
|
||||
},
|
||||
{
|
||||
inline: 'strong',
|
||||
remove: 'all'
|
||||
},
|
||||
{
|
||||
inline: 'span',
|
||||
styles: { fontWeight: 'bold' }
|
||||
}
|
||||
],
|
||||
italic: [
|
||||
{
|
||||
inline: 'i',
|
||||
remove: 'all'
|
||||
},
|
||||
{
|
||||
inline: 'em',
|
||||
remove: 'all'
|
||||
},
|
||||
{
|
||||
inline: 'span',
|
||||
styles: { fontStyle: 'italic' }
|
||||
}
|
||||
],
|
||||
underline: [
|
||||
{
|
||||
inline: 'u',
|
||||
remove: 'all'
|
||||
},
|
||||
{
|
||||
inline: 'span',
|
||||
styles: { textDecoration: 'underline' },
|
||||
exact: true
|
||||
}
|
||||
],
|
||||
strikethrough: [
|
||||
{
|
||||
inline: 'strike',
|
||||
remove: 'all'
|
||||
},
|
||||
{
|
||||
inline: 'span',
|
||||
styles: { textDecoration: 'line-through' },
|
||||
exact: true
|
||||
}
|
||||
],
|
||||
fontname: {
|
||||
inline: 'font',
|
||||
attributes: { face: '%value' }
|
||||
},
|
||||
fontsize: {
|
||||
inline: 'font',
|
||||
attributes: {
|
||||
size: function (vars) {
|
||||
return global$1.inArray(fontSizes, vars.value) + 1;
|
||||
}
|
||||
}
|
||||
},
|
||||
forecolor: {
|
||||
inline: 'font',
|
||||
attributes: { color: '%value' }
|
||||
},
|
||||
hilitecolor: {
|
||||
inline: 'font',
|
||||
styles: { backgroundColor: '%value' }
|
||||
}
|
||||
});
|
||||
global$1.each('b,i,u,strike'.split(','), function (name) {
|
||||
schema.addValidElements(name + '[*]');
|
||||
});
|
||||
if (!schema.getElementRule('font')) {
|
||||
schema.addValidElements('font[face|size|color|style]');
|
||||
}
|
||||
global$1.each(alignElements.split(','), function (name) {
|
||||
var rule = schema.getElementRule(name);
|
||||
if (rule) {
|
||||
if (!rule.attributes.align) {
|
||||
rule.attributes.align = {};
|
||||
rule.attributesOrder.push('align');
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
var setup = function (editor) {
|
||||
editor.settings.inline_styles = false;
|
||||
editor.on('init', function () {
|
||||
overrideFormats(editor);
|
||||
});
|
||||
};
|
||||
var $_bw3ugif2jh8lpv52 = { setup: setup };
|
||||
|
||||
// Override some internal formats to produce legacy elements and attributes
|
||||
editor.formatter.register({
|
||||
// Change alignment formats to use the deprecated align attribute
|
||||
alignleft: {selector: alignElements, attributes: {align: 'left'}},
|
||||
aligncenter: {selector: alignElements, attributes: {align: 'center'}},
|
||||
alignright: {selector: alignElements, attributes: {align: 'right'}},
|
||||
alignjustify: {selector: alignElements, attributes: {align: 'justify'}},
|
||||
var register = function (editor) {
|
||||
editor.addButton('fontsizeselect', function () {
|
||||
var items = [], defaultFontsizeFormats = '8pt=1 10pt=2 12pt=3 14pt=4 18pt=5 24pt=6 36pt=7';
|
||||
var fontsizeFormats = editor.settings.fontsizeFormats || defaultFontsizeFormats;
|
||||
editor.$.each(fontsizeFormats.split(' '), function (i, item) {
|
||||
var text = item, value = item;
|
||||
var values = item.split('=');
|
||||
if (values.length > 1) {
|
||||
text = values[0];
|
||||
value = values[1];
|
||||
}
|
||||
items.push({
|
||||
text: text,
|
||||
value: value
|
||||
});
|
||||
});
|
||||
return {
|
||||
type: 'listbox',
|
||||
text: 'Font Sizes',
|
||||
tooltip: 'Font Sizes',
|
||||
values: items,
|
||||
fixedWidth: true,
|
||||
onPostRender: function () {
|
||||
var self = this;
|
||||
editor.on('NodeChange', function () {
|
||||
var fontElm;
|
||||
fontElm = editor.dom.getParent(editor.selection.getNode(), 'font');
|
||||
if (fontElm) {
|
||||
self.value(fontElm.size);
|
||||
} else {
|
||||
self.value('');
|
||||
}
|
||||
});
|
||||
},
|
||||
onclick: function (e) {
|
||||
if (e.control.settings.value) {
|
||||
editor.execCommand('FontSize', false, e.control.settings.value);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
editor.addButton('fontselect', function () {
|
||||
function createFormats(formats) {
|
||||
formats = formats.replace(/;$/, '').split(';');
|
||||
var i = formats.length;
|
||||
while (i--) {
|
||||
formats[i] = formats[i].split('=');
|
||||
}
|
||||
return formats;
|
||||
}
|
||||
var defaultFontsFormats = 'Andale Mono=andale mono,monospace;' + 'Arial=arial,helvetica,sans-serif;' + 'Arial Black=arial black,sans-serif;' + 'Book Antiqua=book antiqua,palatino,serif;' + 'Comic Sans MS=comic sans ms,sans-serif;' + 'Courier New=courier new,courier,monospace;' + 'Georgia=georgia,palatino,serif;' + 'Helvetica=helvetica,arial,sans-serif;' + 'Impact=impact,sans-serif;' + 'Symbol=symbol;' + 'Tahoma=tahoma,arial,helvetica,sans-serif;' + 'Terminal=terminal,monaco,monospace;' + 'Times New Roman=times new roman,times,serif;' + 'Trebuchet MS=trebuchet ms,geneva,sans-serif;' + 'Verdana=verdana,geneva,sans-serif;' + 'Webdings=webdings;' + 'Wingdings=wingdings,zapf dingbats';
|
||||
var items = [], fonts = createFormats(editor.settings.font_formats || defaultFontsFormats);
|
||||
editor.$.each(fonts, function (i, font) {
|
||||
items.push({
|
||||
text: { raw: font[0] },
|
||||
value: font[1],
|
||||
textStyle: font[1].indexOf('dings') === -1 ? 'font-family:' + font[1] : ''
|
||||
});
|
||||
});
|
||||
return {
|
||||
type: 'listbox',
|
||||
text: 'Font Family',
|
||||
tooltip: 'Font Family',
|
||||
values: items,
|
||||
fixedWidth: true,
|
||||
onPostRender: function () {
|
||||
var self = this;
|
||||
editor.on('NodeChange', function () {
|
||||
var fontElm;
|
||||
fontElm = editor.dom.getParent(editor.selection.getNode(), 'font');
|
||||
if (fontElm) {
|
||||
self.value(fontElm.face);
|
||||
} else {
|
||||
self.value('');
|
||||
}
|
||||
});
|
||||
},
|
||||
onselect: function (e) {
|
||||
if (e.control.settings.value) {
|
||||
editor.execCommand('FontName', false, e.control.settings.value);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
};
|
||||
var $_bogc51f4jh8lpv56 = { register: register };
|
||||
|
||||
// Change the basic formatting elements to use deprecated element types
|
||||
bold: [
|
||||
{inline: 'b', remove: 'all'},
|
||||
{inline: 'strong', remove: 'all'},
|
||||
{inline: 'span', styles: {fontWeight: 'bold'}}
|
||||
],
|
||||
italic: [
|
||||
{inline: 'i', remove: 'all'},
|
||||
{inline: 'em', remove: 'all'},
|
||||
{inline: 'span', styles: {fontStyle: 'italic'}}
|
||||
],
|
||||
underline: [
|
||||
{inline: 'u', remove: 'all'},
|
||||
{inline: 'span', styles: {textDecoration: 'underline'}, exact: true}
|
||||
],
|
||||
strikethrough: [
|
||||
{inline: 'strike', remove: 'all'},
|
||||
{inline: 'span', styles: {textDecoration: 'line-through'}, exact: true}
|
||||
],
|
||||
global.add('legacyoutput', function (editor) {
|
||||
$_bw3ugif2jh8lpv52.setup(editor);
|
||||
$_bogc51f4jh8lpv56.register(editor);
|
||||
});
|
||||
function Plugin () {
|
||||
}
|
||||
|
||||
// Change font size and font family to use the deprecated font element
|
||||
fontname: {inline: 'font', attributes: {face: '%value'}},
|
||||
fontsize: {
|
||||
inline: 'font',
|
||||
attributes: {
|
||||
size: function(vars) {
|
||||
return tinymce.inArray(fontSizes, vars.value) + 1;
|
||||
}
|
||||
}
|
||||
},
|
||||
return Plugin;
|
||||
|
||||
// Setup font elements for colors as well
|
||||
forecolor: {inline: 'font', attributes: {color: '%value'}},
|
||||
hilitecolor: {inline: 'font', styles: {backgroundColor: '%value'}}
|
||||
});
|
||||
|
||||
// Check that deprecated elements are allowed if not add them
|
||||
tinymce.each('b,i,u,strike'.split(','), function(name) {
|
||||
schema.addValidElements(name + '[*]');
|
||||
});
|
||||
|
||||
// Add font element if it's missing
|
||||
if (!schema.getElementRule("font")) {
|
||||
schema.addValidElements("font[face|size|color|style]");
|
||||
}
|
||||
|
||||
// Add the missing and depreacted align attribute for the serialization engine
|
||||
tinymce.each(alignElements.split(','), function(name) {
|
||||
var rule = schema.getElementRule(name);
|
||||
|
||||
if (rule) {
|
||||
if (!rule.attributes.align) {
|
||||
rule.attributes.align = {};
|
||||
rule.attributesOrder.push('align');
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
editor.addButton('fontsizeselect', function() {
|
||||
var items = [], defaultFontsizeFormats = '8pt=1 10pt=2 12pt=3 14pt=4 18pt=5 24pt=6 36pt=7';
|
||||
var fontsize_formats = editor.settings.fontsize_formats || defaultFontsizeFormats;
|
||||
|
||||
editor.$.each(fontsize_formats.split(' '), function(i, item) {
|
||||
var text = item, value = item;
|
||||
var values = item.split('=');
|
||||
|
||||
if (values.length > 1) {
|
||||
text = values[0];
|
||||
value = values[1];
|
||||
}
|
||||
|
||||
items.push({text: text, value: value});
|
||||
});
|
||||
|
||||
return {
|
||||
type: 'listbox',
|
||||
text: 'Font Sizes',
|
||||
tooltip: 'Font Sizes',
|
||||
values: items,
|
||||
fixedWidth: true,
|
||||
onPostRender: function() {
|
||||
var self = this;
|
||||
|
||||
editor.on('NodeChange', function() {
|
||||
var fontElm;
|
||||
|
||||
fontElm = editor.dom.getParent(editor.selection.getNode(), 'font');
|
||||
if (fontElm) {
|
||||
self.value(fontElm.size);
|
||||
} else {
|
||||
self.value('');
|
||||
}
|
||||
});
|
||||
},
|
||||
onclick: function(e) {
|
||||
if (e.control.settings.value) {
|
||||
editor.execCommand('FontSize', false, e.control.settings.value);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
editor.addButton('fontselect', function() {
|
||||
function createFormats(formats) {
|
||||
formats = formats.replace(/;$/, '').split(';');
|
||||
|
||||
var i = formats.length;
|
||||
while (i--) {
|
||||
formats[i] = formats[i].split('=');
|
||||
}
|
||||
|
||||
return formats;
|
||||
}
|
||||
|
||||
var defaultFontsFormats =
|
||||
'Andale Mono=andale mono,monospace;' +
|
||||
'Arial=arial,helvetica,sans-serif;' +
|
||||
'Arial Black=arial black,sans-serif;' +
|
||||
'Book Antiqua=book antiqua,palatino,serif;' +
|
||||
'Comic Sans MS=comic sans ms,sans-serif;' +
|
||||
'Courier New=courier new,courier,monospace;' +
|
||||
'Georgia=georgia,palatino,serif;' +
|
||||
'Helvetica=helvetica,arial,sans-serif;' +
|
||||
'Impact=impact,sans-serif;' +
|
||||
'Symbol=symbol;' +
|
||||
'Tahoma=tahoma,arial,helvetica,sans-serif;' +
|
||||
'Terminal=terminal,monaco,monospace;' +
|
||||
'Times New Roman=times new roman,times,serif;' +
|
||||
'Trebuchet MS=trebuchet ms,geneva,sans-serif;' +
|
||||
'Verdana=verdana,geneva,sans-serif;' +
|
||||
'Webdings=webdings;' +
|
||||
'Wingdings=wingdings,zapf dingbats';
|
||||
|
||||
var items = [], fonts = createFormats(editor.settings.font_formats || defaultFontsFormats);
|
||||
|
||||
$.each(fonts, function(i, font) {
|
||||
items.push({
|
||||
text: {raw: font[0]},
|
||||
value: font[1],
|
||||
textStyle: font[1].indexOf('dings') == -1 ? 'font-family:' + font[1] : ''
|
||||
});
|
||||
});
|
||||
|
||||
return {
|
||||
type: 'listbox',
|
||||
text: 'Font Family',
|
||||
tooltip: 'Font Family',
|
||||
values: items,
|
||||
fixedWidth: true,
|
||||
onPostRender: function() {
|
||||
var self = this;
|
||||
|
||||
editor.on('NodeChange', function() {
|
||||
var fontElm;
|
||||
|
||||
fontElm = editor.dom.getParent(editor.selection.getNode(), 'font');
|
||||
if (fontElm) {
|
||||
self.value(fontElm.face);
|
||||
} else {
|
||||
self.value('');
|
||||
}
|
||||
});
|
||||
},
|
||||
onselect: function(e) {
|
||||
if (e.control.settings.value) {
|
||||
editor.execCommand('FontName', false, e.control.settings.value);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
})(tinymce);
|
||||
}());
|
||||
})();
|
||||
|
||||
@@ -1 +1 @@
|
||||
!function(a){a.on("AddEditor",function(a){a.editor.settings.inline_styles=!1}),a.PluginManager.add("legacyoutput",function(b,c,d){b.on("init",function(){var c="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",d=a.explode(b.settings.font_size_style_values),e=b.schema;b.formatter.register({alignleft:{selector:c,attributes:{align:"left"}},aligncenter:{selector:c,attributes:{align:"center"}},alignright:{selector:c,attributes:{align:"right"}},alignjustify:{selector:c,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all"},{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all"},{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all"},{inline:"span",styles:{textDecoration:"underline"},exact:!0}],strikethrough:[{inline:"strike",remove:"all"},{inline:"span",styles:{textDecoration:"line-through"},exact:!0}],fontname:{inline:"font",attributes:{face:"%value"}},fontsize:{inline:"font",attributes:{size:function(b){return a.inArray(d,b.value)+1}}},forecolor:{inline:"font",attributes:{color:"%value"}},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"}}}),a.each("b,i,u,strike".split(","),function(a){e.addValidElements(a+"[*]")}),e.getElementRule("font")||e.addValidElements("font[face|size|color|style]"),a.each(c.split(","),function(a){var b=e.getElementRule(a);b&&(b.attributes.align||(b.attributes.align={},b.attributesOrder.push("align")))})}),b.addButton("fontsizeselect",function(){var a=[],c="8pt=1 10pt=2 12pt=3 14pt=4 18pt=5 24pt=6 36pt=7",d=b.settings.fontsize_formats||c;return b.$.each(d.split(" "),function(b,c){var d=c,e=c,f=c.split("=");f.length>1&&(d=f[0],e=f[1]),a.push({text:d,value:e})}),{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:a,fixedWidth:!0,onPostRender:function(){var a=this;b.on("NodeChange",function(){var c;c=b.dom.getParent(b.selection.getNode(),"font"),a.value(c?c.size:"")})},onclick:function(a){a.control.settings.value&&b.execCommand("FontSize",!1,a.control.settings.value)}}}),b.addButton("fontselect",function(){function a(a){a=a.replace(/;$/,"").split(";");for(var b=a.length;b--;)a[b]=a[b].split("=");return a}var c="Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats",e=[],f=a(b.settings.font_formats||c);return d.each(f,function(a,b){e.push({text:{raw:b[0]},value:b[1],textStyle:-1==b[1].indexOf("dings")?"font-family:"+b[1]:""})}),{type:"listbox",text:"Font Family",tooltip:"Font Family",values:e,fixedWidth:!0,onPostRender:function(){var a=this;b.on("NodeChange",function(){var c;c=b.dom.getParent(b.selection.getNode(),"font"),a.value(c?c.face:"")})},onselect:function(a){a.control.settings.value&&b.execCommand("FontName",!1,a.control.settings.value)}}})})}(tinymce);
|
||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=tinymce.util.Tools.resolve("tinymce.util.Tools"),t=function(a){a.settings.inline_styles=!1,a.on("init",function(){var e,t,n,i;e=a,t="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",n=o.explode(e.settings.font_size_style_values),i=e.schema,e.formatter.register({alignleft:{selector:t,attributes:{align:"left"}},aligncenter:{selector:t,attributes:{align:"center"}},alignright:{selector:t,attributes:{align:"right"}},alignjustify:{selector:t,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all"},{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all"},{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all"},{inline:"span",styles:{textDecoration:"underline"},exact:!0}],strikethrough:[{inline:"strike",remove:"all"},{inline:"span",styles:{textDecoration:"line-through"},exact:!0}],fontname:{inline:"font",attributes:{face:"%value"}},fontsize:{inline:"font",attributes:{size:function(e){return o.inArray(n,e.value)+1}}},forecolor:{inline:"font",attributes:{color:"%value"}},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"}}}),o.each("b,i,u,strike".split(","),function(e){i.addValidElements(e+"[*]")}),i.getElementRule("font")||i.addValidElements("font[face|size|color|style]"),o.each(t.split(","),function(e){var t=i.getElementRule(e);t&&(t.attributes.align||(t.attributes.align={},t.attributesOrder.push("align")))})})},n=function(i){i.addButton("fontsizeselect",function(){var o=[],e=i.settings.fontsizeFormats||"8pt=1 10pt=2 12pt=3 14pt=4 18pt=5 24pt=6 36pt=7";return i.$.each(e.split(" "),function(e,t){var n=t,i=t,a=t.split("=");1<a.length&&(n=a[0],i=a[1]),o.push({text:n,value:i})}),{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:o,fixedWidth:!0,onPostRender:function(){var t=this;i.on("NodeChange",function(){var e;(e=i.dom.getParent(i.selection.getNode(),"font"))?t.value(e.size):t.value("")})},onclick:function(e){e.control.settings.value&&i.execCommand("FontSize",!1,e.control.settings.value)}}}),i.addButton("fontselect",function(){var n=[],e=function(e){for(var t=(e=e.replace(/;$/,"").split(";")).length;t--;)e[t]=e[t].split("=");return e}(i.settings.font_formats||"Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats");return i.$.each(e,function(e,t){n.push({text:{raw:t[0]},value:t[1],textStyle:-1===t[1].indexOf("dings")?"font-family:"+t[1]:""})}),{type:"listbox",text:"Font Family",tooltip:"Font Family",values:n,fixedWidth:!0,onPostRender:function(){var t=this;i.on("NodeChange",function(){var e;(e=i.dom.getParent(i.selection.getNode(),"font"))?t.value(e.face):t.value("")})},onselect:function(e){e.control.settings.value&&i.execCommand("FontName",!1,e.control.settings.value)}}})};e.add("legacyoutput",function(e){t(e),n(e)})}();
|
||||
@@ -0,0 +1,7 @@
|
||||
// Exports the "link" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/link')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/link'
|
||||
require('./plugin.js');
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user