summaryrefslogtreecommitdiff
path: root/_source/plugins/placeholder
diff options
context:
space:
mode:
Diffstat (limited to '_source/plugins/placeholder')
-rw-r--r--_source/plugins/placeholder/dialogs/placeholder.js71
-rw-r--r--_source/plugins/placeholder/lang/_translationstatus.txt26
-rw-r--r--_source/plugins/placeholder/lang/bg.js16
-rw-r--r--_source/plugins/placeholder/lang/cs.js16
-rw-r--r--_source/plugins/placeholder/lang/cy.js16
-rw-r--r--_source/plugins/placeholder/lang/da.js16
-rw-r--r--_source/plugins/placeholder/lang/de.js16
-rw-r--r--_source/plugins/placeholder/lang/el.js16
-rw-r--r--_source/plugins/placeholder/lang/en.js16
-rw-r--r--_source/plugins/placeholder/lang/eo.js16
-rw-r--r--_source/plugins/placeholder/lang/et.js16
-rw-r--r--_source/plugins/placeholder/lang/fa.js16
-rw-r--r--_source/plugins/placeholder/lang/fi.js16
-rw-r--r--_source/plugins/placeholder/lang/fr.js16
-rw-r--r--_source/plugins/placeholder/lang/he.js16
-rw-r--r--_source/plugins/placeholder/lang/hr.js16
-rw-r--r--_source/plugins/placeholder/lang/it.js16
-rw-r--r--_source/plugins/placeholder/lang/nb.js16
-rw-r--r--_source/plugins/placeholder/lang/nl.js16
-rw-r--r--_source/plugins/placeholder/lang/no.js16
-rw-r--r--_source/plugins/placeholder/lang/pl.js16
-rw-r--r--_source/plugins/placeholder/lang/tr.js16
-rw-r--r--_source/plugins/placeholder/lang/ug.js16
-rw-r--r--_source/plugins/placeholder/lang/uk.js16
-rw-r--r--_source/plugins/placeholder/lang/vi.js16
-rw-r--r--_source/plugins/placeholder/lang/zh-cn.js16
-rw-r--r--_source/plugins/placeholder/placeholder.gifbin0 -> 96 bytes
-rw-r--r--_source/plugins/placeholder/plugin.js171
28 files changed, 652 insertions, 0 deletions
diff --git a/_source/plugins/placeholder/dialogs/placeholder.js b/_source/plugins/placeholder/dialogs/placeholder.js
new file mode 100644
index 0000000..94c8c9e
--- /dev/null
+++ b/_source/plugins/placeholder/dialogs/placeholder.js
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.html or http://ckeditor.com/license
+ */
+
+(function()
+{
+ function placeholderDialog( editor, isEdit )
+ {
+
+ var lang = editor.lang.placeholder,
+ generalLabel = editor.lang.common.generalTab;
+ return {
+ title : lang.title,
+ minWidth : 300,
+ minHeight : 80,
+ contents :
+ [
+ {
+ id : 'info',
+ label : generalLabel,
+ title : generalLabel,
+ elements :
+ [
+ {
+ id : 'text',
+ type : 'text',
+ style : 'width: 100%;',
+ label : lang.text,
+ 'default' : '',
+ required : true,
+ validate : CKEDITOR.dialog.validate.notEmpty( lang.textMissing ),
+ setup : function( element )
+ {
+ if ( isEdit )
+ this.setValue( element.getText().slice( 2, -2 ) );
+ },
+ commit : function( element )
+ {
+ var text = '[[' + this.getValue() + ']]';
+ // The placeholder must be recreated.
+ CKEDITOR.plugins.placeholder.createPlaceholder( editor, element, text );
+ }
+ }
+ ]
+ }
+ ],
+ onShow : function()
+ {
+ if ( isEdit )
+ this._element = CKEDITOR.plugins.placeholder.getSelectedPlaceHoder( editor );
+
+ this.setupContent( this._element );
+ },
+ onOk : function()
+ {
+ this.commitContent( this._element );
+ delete this._element;
+ }
+ };
+ }
+
+ CKEDITOR.dialog.add( 'createplaceholder', function( editor )
+ {
+ return placeholderDialog( editor );
+ });
+ CKEDITOR.dialog.add( 'editplaceholder', function( editor )
+ {
+ return placeholderDialog( editor, 1 );
+ });
+} )();
diff --git a/_source/plugins/placeholder/lang/_translationstatus.txt b/_source/plugins/placeholder/lang/_translationstatus.txt
new file mode 100644
index 0000000..a72d432
--- /dev/null
+++ b/_source/plugins/placeholder/lang/_translationstatus.txt
@@ -0,0 +1,26 @@
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+
+bg.js Found: 5 Missing: 0
+cs.js Found: 5 Missing: 0
+cy.js Found: 5 Missing: 0
+da.js Found: 5 Missing: 0
+de.js Found: 5 Missing: 0
+el.js Found: 5 Missing: 0
+eo.js Found: 5 Missing: 0
+et.js Found: 5 Missing: 0
+fa.js Found: 5 Missing: 0
+fi.js Found: 5 Missing: 0
+fr.js Found: 5 Missing: 0
+he.js Found: 5 Missing: 0
+hr.js Found: 5 Missing: 0
+it.js Found: 5 Missing: 0
+nb.js Found: 5 Missing: 0
+nl.js Found: 5 Missing: 0
+no.js Found: 5 Missing: 0
+pl.js Found: 5 Missing: 0
+tr.js Found: 5 Missing: 0
+ug.js Found: 5 Missing: 0
+uk.js Found: 5 Missing: 0
+vi.js Found: 3 Missing: 2
+zh-cn.js Found: 5 Missing: 0
diff --git a/_source/plugins/placeholder/lang/bg.js b/_source/plugins/placeholder/lang/bg.js
new file mode 100644
index 0000000..96a088a
--- /dev/null
+++ b/_source/plugins/placeholder/lang/bg.js
@@ -0,0 +1,16 @@
+/*
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'placeholder', 'bg',
+{
+ placeholder :
+ {
+ title : 'Настройки на контейнера',
+ toolbar : 'Нов контейнер',
+ text : 'Текст за контейнера',
+ edit : 'Промяна на контейнер',
+ textMissing : 'Контейнера трябва да съдържа текст.'
+ }
+});
diff --git a/_source/plugins/placeholder/lang/cs.js b/_source/plugins/placeholder/lang/cs.js
new file mode 100644
index 0000000..afa3537
--- /dev/null
+++ b/_source/plugins/placeholder/lang/cs.js
@@ -0,0 +1,16 @@
+/*
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'placeholder', 'cs',
+{
+ placeholder :
+ {
+ title : 'Vlastnosti vyhrazeného prostoru',
+ toolbar : 'Vytvořit vyhrazený prostor',
+ text : 'Vyhrazený text',
+ edit : 'Upravit vyhrazený prostor',
+ textMissing : 'Vyhrazený prostor musí obsahovat text.'
+ }
+});
diff --git a/_source/plugins/placeholder/lang/cy.js b/_source/plugins/placeholder/lang/cy.js
new file mode 100644
index 0000000..1ac1e03
--- /dev/null
+++ b/_source/plugins/placeholder/lang/cy.js
@@ -0,0 +1,16 @@
+/*
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'placeholder', 'cy',
+{
+ placeholder :
+ {
+ title : 'Priodweddau\'r Daliwr Geiriau',
+ toolbar : 'Creu Daliwr Geiriau',
+ text : 'Testun y Daliwr Geiriau',
+ edit : 'Golygu\'r Dailwr Geiriau',
+ textMissing : 'Mae\'n rhaid i\'r daliwr geiriau gynnwys testun.'
+ }
+});
diff --git a/_source/plugins/placeholder/lang/da.js b/_source/plugins/placeholder/lang/da.js
new file mode 100644
index 0000000..ad31c3f
--- /dev/null
+++ b/_source/plugins/placeholder/lang/da.js
@@ -0,0 +1,16 @@
+/*
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'placeholder', 'da',
+{
+ placeholder :
+ {
+ title : 'Egenskaber for pladsholder',
+ toolbar : 'Opret pladsholder',
+ text : 'Tekst til pladsholder',
+ edit : 'Rediger pladsholder',
+ textMissing : 'Pladsholder skal indeholde tekst'
+ }
+});
diff --git a/_source/plugins/placeholder/lang/de.js b/_source/plugins/placeholder/lang/de.js
new file mode 100644
index 0000000..4d91ba4
--- /dev/null
+++ b/_source/plugins/placeholder/lang/de.js
@@ -0,0 +1,16 @@
+/*
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'placeholder', 'de',
+{
+ placeholder :
+ {
+ title : 'Platzhalter Einstellungen',
+ toolbar : 'Platzhalter erstellen',
+ text : 'Platzhalter Text',
+ edit : 'Platzhalter bearbeiten',
+ textMissing : 'Der Platzhalter muss einen Text beinhalten.'
+ }
+});
diff --git a/_source/plugins/placeholder/lang/el.js b/_source/plugins/placeholder/lang/el.js
new file mode 100644
index 0000000..315674b
--- /dev/null
+++ b/_source/plugins/placeholder/lang/el.js
@@ -0,0 +1,16 @@
+/*
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'placeholder', 'el',
+{
+ placeholder :
+ {
+ title : 'Ιδιότητες Υποκατάστατου Κειμένου',
+ toolbar : 'Δημιουργία Υποκατάσταστου Κειμένου',
+ text : 'Υποκαθιστόμενο Κείμενο',
+ edit : 'Επεξεργασία Υποκατάσταστου Κειμένου',
+ textMissing : 'Πρέπει να υπάρχει υποκαθιστόμενο κείμενο.'
+ }
+});
diff --git a/_source/plugins/placeholder/lang/en.js b/_source/plugins/placeholder/lang/en.js
new file mode 100644
index 0000000..060850c
--- /dev/null
+++ b/_source/plugins/placeholder/lang/en.js
@@ -0,0 +1,16 @@
+/*
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'placeholder', 'en',
+{
+ placeholder :
+ {
+ title : 'Placeholder Properties',
+ toolbar : 'Create Placeholder',
+ text : 'Placeholder Text',
+ edit : 'Edit Placeholder',
+ textMissing : 'The placeholder must contain text.'
+ }
+});
diff --git a/_source/plugins/placeholder/lang/eo.js b/_source/plugins/placeholder/lang/eo.js
new file mode 100644
index 0000000..1cafa60
--- /dev/null
+++ b/_source/plugins/placeholder/lang/eo.js
@@ -0,0 +1,16 @@
+/*
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'placeholder', 'eo',
+{
+ placeholder :
+ {
+ title : 'Atributoj de la rezervita spaco',
+ toolbar : 'Krei la rezervitan spacon',
+ text : 'Texto de la rezervita spaco',
+ edit : 'Modifi la rezervitan spacon',
+ textMissing : 'La rezervita spaco devas enteni tekston.'
+ }
+});
diff --git a/_source/plugins/placeholder/lang/et.js b/_source/plugins/placeholder/lang/et.js
new file mode 100644
index 0000000..1b7dd98
--- /dev/null
+++ b/_source/plugins/placeholder/lang/et.js
@@ -0,0 +1,16 @@
+/*
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'placeholder', 'et',
+{
+ placeholder :
+ {
+ title : 'Kohahoidja omadused',
+ toolbar : 'Kohahoidja loomine',
+ text : 'Kohahoidja tekst',
+ edit : 'Kohahoidja muutmine',
+ textMissing : 'Kohahoidja peab sisaldama teksti.'
+ }
+});
diff --git a/_source/plugins/placeholder/lang/fa.js b/_source/plugins/placeholder/lang/fa.js
new file mode 100644
index 0000000..6154598
--- /dev/null
+++ b/_source/plugins/placeholder/lang/fa.js
@@ -0,0 +1,16 @@
+/*
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'placeholder', 'fa',
+{
+ placeholder :
+ {
+ title : 'ویژگیهای محل نگهداری',
+ toolbar : 'ایجاد یک محل نگهداری',
+ text : 'متن محل نگهداری',
+ edit : 'ویرایش محل نگهداری',
+ textMissing : 'محل نگهداری باید محتوی متن باشد.'
+ }
+});
diff --git a/_source/plugins/placeholder/lang/fi.js b/_source/plugins/placeholder/lang/fi.js
new file mode 100644
index 0000000..598cfca
--- /dev/null
+++ b/_source/plugins/placeholder/lang/fi.js
@@ -0,0 +1,16 @@
+/*
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'placeholder', 'fi',
+{
+ placeholder :
+ {
+ title : 'Paikkamerkin ominaisuudet',
+ toolbar : 'Luo paikkamerkki',
+ text : 'Paikkamerkin teksti',
+ edit : 'Muokkaa paikkamerkkiä',
+ textMissing : 'Paikkamerkin täytyy sisältää tekstiä'
+ }
+});
diff --git a/_source/plugins/placeholder/lang/fr.js b/_source/plugins/placeholder/lang/fr.js
new file mode 100644
index 0000000..b887619
--- /dev/null
+++ b/_source/plugins/placeholder/lang/fr.js
@@ -0,0 +1,16 @@
+/*
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'placeholder', 'fr',
+{
+ placeholder :
+ {
+ title : 'Propriétés de l\'Espace réservé',
+ toolbar : 'Créer l\'Espace réservé',
+ text : 'Texte de l\'Espace réservé',
+ edit : 'Modifier l\'Espace réservé',
+ textMissing : 'L\'Espace réservé doit contenir du texte.'
+ }
+});
diff --git a/_source/plugins/placeholder/lang/he.js b/_source/plugins/placeholder/lang/he.js
new file mode 100644
index 0000000..5dfc09f
--- /dev/null
+++ b/_source/plugins/placeholder/lang/he.js
@@ -0,0 +1,16 @@
+/*
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'placeholder', 'he',
+{
+ placeholder :
+ {
+ title : 'מאפייני שומר מקום',
+ toolbar : 'צור שומר מקום',
+ text : 'תוכן שומר המקום',
+ edit : 'ערוך שומר מקום',
+ textMissing : 'שומר המקום חייב להכיל טקסט.'
+ }
+});
diff --git a/_source/plugins/placeholder/lang/hr.js b/_source/plugins/placeholder/lang/hr.js
new file mode 100644
index 0000000..7156ab3
--- /dev/null
+++ b/_source/plugins/placeholder/lang/hr.js
@@ -0,0 +1,16 @@
+/*
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'placeholder', 'hr',
+{
+ placeholder :
+ {
+ title : 'Svojstva rezerviranog mjesta',
+ toolbar : 'Napravi rezervirano mjesto',
+ text : 'Tekst rezerviranog mjesta',
+ edit : 'Uredi rezervirano mjesto',
+ textMissing : 'Rezervirano mjesto mora sadržavati tekst.'
+ }
+});
diff --git a/_source/plugins/placeholder/lang/it.js b/_source/plugins/placeholder/lang/it.js
new file mode 100644
index 0000000..920657a
--- /dev/null
+++ b/_source/plugins/placeholder/lang/it.js
@@ -0,0 +1,16 @@
+/*
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'placeholder', 'it',
+{
+ placeholder :
+ {
+ title : 'Proprietà segnaposto',
+ toolbar : 'Crea segnaposto',
+ text : 'Testo segnaposto',
+ edit : 'Modifica segnaposto',
+ textMissing : 'Il segnaposto deve contenere del testo.'
+ }
+});
diff --git a/_source/plugins/placeholder/lang/nb.js b/_source/plugins/placeholder/lang/nb.js
new file mode 100644
index 0000000..d891784
--- /dev/null
+++ b/_source/plugins/placeholder/lang/nb.js
@@ -0,0 +1,16 @@
+/*
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'placeholder', 'nb',
+{
+ placeholder :
+ {
+ title : 'Egenskaper for plassholder',
+ toolbar : 'Opprett plassholder',
+ text : 'Tekst for plassholder',
+ edit : 'Rediger plassholder',
+ textMissing : 'Plassholderen må inneholde tekst.'
+ }
+});
diff --git a/_source/plugins/placeholder/lang/nl.js b/_source/plugins/placeholder/lang/nl.js
new file mode 100644
index 0000000..558504a
--- /dev/null
+++ b/_source/plugins/placeholder/lang/nl.js
@@ -0,0 +1,16 @@
+/*
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'placeholder', 'nl',
+{
+ placeholder :
+ {
+ title : 'Eigenschappen placeholder',
+ toolbar : 'Placeholder aanmaken',
+ text : 'Placeholder tekst',
+ edit : 'Placeholder wijzigen',
+ textMissing : 'De placeholder moet tekst bevatten.'
+ }
+});
diff --git a/_source/plugins/placeholder/lang/no.js b/_source/plugins/placeholder/lang/no.js
new file mode 100644
index 0000000..f258ee3
--- /dev/null
+++ b/_source/plugins/placeholder/lang/no.js
@@ -0,0 +1,16 @@
+/*
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'placeholder', 'no',
+{
+ placeholder :
+ {
+ title : 'Egenskaper for plassholder',
+ toolbar : 'Opprett plassholder',
+ text : 'Tekst for plassholder',
+ edit : 'Rediger plassholder',
+ textMissing : 'Plassholderen må inneholde tekst.'
+ }
+});
diff --git a/_source/plugins/placeholder/lang/pl.js b/_source/plugins/placeholder/lang/pl.js
new file mode 100644
index 0000000..94c5390
--- /dev/null
+++ b/_source/plugins/placeholder/lang/pl.js
@@ -0,0 +1,16 @@
+/*
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'placeholder', 'pl',
+{
+ placeholder :
+ {
+ title : 'Właściwości wypełniacza',
+ toolbar : 'Utwórz wypełniacz',
+ text : 'Tekst wypełnienia',
+ edit : 'Edytuj wypełnienie',
+ textMissing : 'Wypełnienie musi posiadać jakiś tekst.'
+ }
+});
diff --git a/_source/plugins/placeholder/lang/tr.js b/_source/plugins/placeholder/lang/tr.js
new file mode 100644
index 0000000..117da13
--- /dev/null
+++ b/_source/plugins/placeholder/lang/tr.js
@@ -0,0 +1,16 @@
+/*
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'placeholder', 'tr',
+{
+ placeholder :
+ {
+ title : 'Yer tutucu özellikleri',
+ toolbar : 'Yer tutucu oluşturun',
+ text : 'Yer tutucu metini',
+ edit : 'Yer tutucuyu düzenle',
+ textMissing : 'Yer tutucu metin içermelidir.'
+ }
+});
diff --git a/_source/plugins/placeholder/lang/ug.js b/_source/plugins/placeholder/lang/ug.js
new file mode 100644
index 0000000..fb6e8a4
--- /dev/null
+++ b/_source/plugins/placeholder/lang/ug.js
@@ -0,0 +1,16 @@
+/*
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'placeholder', 'ug',
+{
+ placeholder :
+ {
+ title : 'ئورۇن بەلگە خاسلىقى',
+ toolbar : 'ئورۇن بەلگە قۇر',
+ text : 'ئورۇن بەلگە تېكىستى',
+ edit : 'ئورۇن بەلگە تەھرىر',
+ textMissing : 'ئورۇن بەلگىسىدە چوقۇم تېكىست بولۇشى لازىم'
+ }
+});
diff --git a/_source/plugins/placeholder/lang/uk.js b/_source/plugins/placeholder/lang/uk.js
new file mode 100644
index 0000000..c7620f7
--- /dev/null
+++ b/_source/plugins/placeholder/lang/uk.js
@@ -0,0 +1,16 @@
+/*
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'placeholder', 'uk',
+{
+ placeholder :
+ {
+ title : 'Налаштування Заповнювача',
+ toolbar : 'Створити Заповнювач',
+ text : 'Текст Заповнювача',
+ edit : 'Редагувати Заповнювач',
+ textMissing : 'Заповнювач повинен містити текст.'
+ }
+});
diff --git a/_source/plugins/placeholder/lang/vi.js b/_source/plugins/placeholder/lang/vi.js
new file mode 100644
index 0000000..bd3175f
--- /dev/null
+++ b/_source/plugins/placeholder/lang/vi.js
@@ -0,0 +1,16 @@
+/*
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'placeholder', 'vi',
+{
+ placeholder :
+ {
+ title : 'Thuộc tính đặt chỗ',
+ toolbar : 'Tạo đặt chỗ',
+ text : 'Văn bản đặt chỗ',
+ edit : 'Edit Placeholder', // MISSING
+ textMissing : 'The placeholder must contain text.' // MISSING
+ }
+});
diff --git a/_source/plugins/placeholder/lang/zh-cn.js b/_source/plugins/placeholder/lang/zh-cn.js
new file mode 100644
index 0000000..adf7219
--- /dev/null
+++ b/_source/plugins/placeholder/lang/zh-cn.js
@@ -0,0 +1,16 @@
+/*
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'placeholder', 'zh-cn',
+{
+ placeholder :
+ {
+ title : '占位符属性',
+ toolbar : '创建占位符',
+ text : '占位符文字',
+ edit : '编辑占位符',
+ textMissing : '占位符必需包含有文字'
+ }
+});
diff --git a/_source/plugins/placeholder/placeholder.gif b/_source/plugins/placeholder/placeholder.gif
new file mode 100644
index 0000000..c07078c
--- /dev/null
+++ b/_source/plugins/placeholder/placeholder.gif
Binary files differ
diff --git a/_source/plugins/placeholder/plugin.js b/_source/plugins/placeholder/plugin.js
new file mode 100644
index 0000000..1830741
--- /dev/null
+++ b/_source/plugins/placeholder/plugin.js
@@ -0,0 +1,171 @@
+/*
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+/**
+ * @fileOverview The "placeholder" plugin.
+ *
+ */
+
+(function()
+{
+ var placeholderReplaceRegex = /\[\[[^\]]+\]\]/g;
+ CKEDITOR.plugins.add( 'placeholder',
+ {
+ requires : [ 'dialog' ],
+ lang : [ 'bg', 'cs', 'cy', 'da', 'de', 'el', 'en', 'eo', 'et', 'fa', 'fi', 'fr', 'he', 'hr', 'it', 'nb', 'nl', 'no', 'pl', 'tr', 'ug', 'uk', 'vi', 'zh-cn' ],
+ init : function( editor )
+ {
+ var lang = editor.lang.placeholder;
+
+ editor.addCommand( 'createplaceholder', new CKEDITOR.dialogCommand( 'createplaceholder' ) );
+ editor.addCommand( 'editplaceholder', new CKEDITOR.dialogCommand( 'editplaceholder' ) );
+
+ editor.ui.addButton( 'CreatePlaceholder',
+ {
+ label : lang.toolbar,
+ command :'createplaceholder',
+ icon : this.path + 'placeholder.gif'
+ });
+
+ if ( editor.addMenuItems )
+ {
+ editor.addMenuGroup( 'placeholder', 20 );
+ editor.addMenuItems(
+ {
+ editplaceholder :
+ {
+ label : lang.edit,
+ command : 'editplaceholder',
+ group : 'placeholder',
+ order : 1,
+ icon : this.path + 'placeholder.gif'
+ }
+ } );
+
+ if ( editor.contextMenu )
+ {
+ editor.contextMenu.addListener( function( element, selection )
+ {
+ if ( !element || !element.data( 'cke-placeholder' ) )
+ return null;
+
+ return { editplaceholder : CKEDITOR.TRISTATE_OFF };
+ } );
+ }
+ }
+
+ editor.on( 'doubleclick', function( evt )
+ {
+ if ( CKEDITOR.plugins.placeholder.getSelectedPlaceHoder( editor ) )
+ evt.data.dialog = 'editplaceholder';
+ });
+
+ editor.addCss(
+ '.cke_placeholder' +
+ '{' +
+ 'background-color: #ffff00;' +
+ ( CKEDITOR.env.gecko ? 'cursor: default;' : '' ) +
+ '}'
+ );
+
+ editor.on( 'contentDom', function()
+ {
+ editor.document.getBody().on( 'resizestart', function( evt )
+ {
+ if ( editor.getSelection().getSelectedElement().data( 'cke-placeholder' ) )
+ evt.data.preventDefault();
+ });
+ });
+
+ CKEDITOR.dialog.add( 'createplaceholder', this.path + 'dialogs/placeholder.js' );
+ CKEDITOR.dialog.add( 'editplaceholder', this.path + 'dialogs/placeholder.js' );
+ },
+ afterInit : function( editor )
+ {
+ var dataProcessor = editor.dataProcessor,
+ dataFilter = dataProcessor && dataProcessor.dataFilter,
+ htmlFilter = dataProcessor && dataProcessor.htmlFilter;
+
+ if ( dataFilter )
+ {
+ dataFilter.addRules(
+ {
+ text : function( text )
+ {
+ return text.replace( placeholderReplaceRegex, function( match )
+ {
+ return CKEDITOR.plugins.placeholder.createPlaceholder( editor, null, match, 1 );
+ });
+ }
+ });
+ }
+
+ if ( htmlFilter )
+ {
+ htmlFilter.addRules(
+ {
+ elements :
+ {
+ 'span' : function( element )
+ {
+ if ( element.attributes && element.attributes[ 'data-cke-placeholder' ] )
+ delete element.name;
+ }
+ }
+ });
+ }
+ }
+ });
+})();
+
+CKEDITOR.plugins.placeholder =
+{
+ createPlaceholder : function( editor, oldElement, text, isGet )
+ {
+ var element = new CKEDITOR.dom.element( 'span', editor.document );
+ element.setAttributes(
+ {
+ contentEditable : 'false',
+ 'data-cke-placeholder' : 1,
+ 'class' : 'cke_placeholder'
+ }
+ );
+
+ text && element.setText( text );
+
+ if ( isGet )
+ return element.getOuterHtml();
+
+ if ( oldElement )
+ {
+ if ( CKEDITOR.env.ie )
+ {
+ element.insertAfter( oldElement );
+ // Some time is required for IE before the element is removed.
+ setTimeout( function()
+ {
+ oldElement.remove();
+ element.focus();
+ }, 10 );
+ }
+ else
+ element.replace( oldElement );
+ }
+ else
+ editor.insertElement( element );
+
+ return null;
+ },
+
+ getSelectedPlaceHoder : function( editor )
+ {
+ var range = editor.getSelection().getRanges()[ 0 ];
+ range.shrink( CKEDITOR.SHRINK_TEXT );
+ var node = range.startContainer;
+ while( node && !( node.type == CKEDITOR.NODE_ELEMENT && node.data( 'cke-placeholder' ) ) )
+ node = node.getParent();
+ return node;
+ }
+};