Commit afe4a8ac authored by sun's avatar sun

#264411 by sun: Renamed module to Wysiwyg Editor.

#264411 by sun: Added TinyMCE data import upon installation.
parent a5db5f4a
......@@ -10,6 +10,8 @@ Wysiwyg 6.x-1.x, xxxx-xx-xx
Wysiwyg 6.x-0.x, xxxx-xx-xx
---------------------------
#264411 by sun: Added TinyMCE data import upon installation.
#264411 by sun: Renamed module to Wysiwyg Editor.
#118747 by nedjo, sun: Upgraded code for jQuery.
Initial fork of TinyMCE module (2008-05-30).
......@@ -12,7 +12,7 @@ Currently supported editors:
For a full description visit the project page:
http://drupal.org/project/wysiwyg
Bug reports, feature suggestions and latest developments:
http://drupal.org/project/wysiwyg (category "Wysiwyg Editor")
http://drupal.org/project/wysiwyg (component "Wysiwyg Editor")
-- REQUIREMENTS --
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
# Copyright YEAR NAME <EMAIL@ADDRESS>
# Generated from files:
# tinymce.module,v 1.90.4.11 2006/12/31 10:48:37 thenicespider
# tinymce.info,v 1.0 2006/12/24 17:51:48 Wendy
# wysiwyg_editor.module,v 1.90.4.11 2006/12/31 10:48:37 thenicespider
# wysiwyg_editor.info,v 1.0 2006/12/24 17:51:48 Wendy
#
msgid ""
msgstr ""
......@@ -16,74 +16,74 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Poedit-Country: HUNGARY\n"
#: tinymce.module:7
#: tinymce.info:0
#: wysiwyg_editor.module:7
#: wysiwyg_editor.info:0
msgid "The most popular WYSIWYG editor for advance content."
msgstr "A legnépszerűbb WYSIWYG szerkesztő bonyolultabb tartalmakhoz."
#: tinymce.module:14
#: wysiwyg_editor.module:14
msgid "Enable WYSIWYG Editor to your site."
msgstr "WYSIWYG szerkesztő enegedélyezése a honlapon."
#: tinymce.module:31
#: tinymce.info:0
#: wysiwyg_editor.module:31
#: wysiwyg_editor.info:0
msgid "TinyMCE"
msgstr "TinyMCE"
#: tinymce.module:32
#: wysiwyg_editor.module:32
msgid "Tinymce settings."
msgstr "Tinymce beállítások."
#: tinymce.module:48
#: wysiwyg_editor.module:48
msgid "Basic settings"
msgstr "Alapbeállítások"
#: tinymce.module:55
#: wysiwyg_editor.module:55
msgid "Editor Mode"
msgstr "Szerkesztő mód"
#: tinymce.module:57
#: wysiwyg_editor.module:57
msgid "Full"
msgstr "Teljes"
#: tinymce.module:57
#: wysiwyg_editor.module:57
msgid "Compact"
msgstr "Tömörített"
#: tinymce.module:57
#: wysiwyg_editor.module:57
msgid "Simple"
msgstr "Egyszerű"
#: tinymce.module:58
#: wysiwyg_editor.module:58
msgid "FULL: enable all TinyMCE features. COMPACT: enable most used features. SIMPLE: just enable simple editor.<hr>"
msgstr "TELJES: az összes TinyMCE funkció engedélyezése. TÖMÖRÍTETT: a leggyakrabban használt funkció engedélyezése. EGYSZERŰ: egyszerű szerkesztő engedélyezése.<hr>"
#: tinymce.module:63
#: wysiwyg_editor.module:63
msgid "Enable TinyMCE for"
msgstr "TinyMCE engedélyezése"
#: tinymce.module:65
#: wysiwyg_editor.module:65
msgid "Edit-body only"
msgstr "Csak szövegtörzsnél"
#: tinymce.module:65
#: wysiwyg_editor.module:65
msgid "Edit-comment only"
msgstr "Csak hozzászólásnál"
#: tinymce.module:65
#: wysiwyg_editor.module:65
msgid "Both"
msgstr "Mindkettő"
#: tinymce.module:66
#: wysiwyg_editor.module:66
msgid "If you want TinyMCE available for textarea of edit-body and comment then you should select <b>Both</b> option."
msgstr "A szövegtörzs és hozzászólás mezők TinyMCE-vel szerkesztésének engedélyezéséhez a <b>Mindkettő</b> beállítást kell választani."
#: tinymce.module:0
#: tinymce.info:0
msgid "tinymce"
msgstr "tinymce"
#: wysiwyg_editor.module:0
#: wysiwyg_editor.info:0
msgid "wysiwyg_editor"
msgstr "wysiwyg_editor"
#: tinymce.info:0
#: wysiwyg_editor.info:0
msgid "5.x-1.x-dev"
msgstr "5.x-1.x-dev"
# $Id$
#
# LANGUAGE translation of Drupal (tinymce.module)
# LANGUAGE translation of Drupal (wysiwyg_editor.module)
# Copyright YEAR NAME <EMAIL@ADDRESS>
# Generated from files:
# tinymce.module,v 1.90.4.12 2007/01/30 06:58:37 thenicespider
# tinymce.info,v 1.0 2006/12/24 17:51:48 Wendy
# wysiwyg_editor.module,v 1.90.4.12 2007/01/30 06:58:37 thenicespider
# wysiwyg_editor.info,v 1.0 2006/12/24 17:51:48 Wendy
#
msgid ""
msgstr ""
......@@ -21,81 +21,81 @@ msgstr ""
"X-Poedit-Country: Turkey\n"
"X-Poedit-SourceCharset: utf-8\n"
#: tinymce.module:7 tinymce.info:0
#: wysiwyg_editor.module:7 wysiwyg_editor.info:0
msgid "The most popular WYSIWYG editor for advance content."
msgstr "Gelişmiş içerikler için en gözde görsel düzenleyici."
#: tinymce.module:8
#: wysiwyg_editor.module:8
msgid "<p><ul><li>Editor mode: full, compact and simple.</li></ul></p>"
msgstr "<p><ul><li>Düzenleyici kipi: Tam, sade ve basit.</li></ul></p>"
#: tinymce.module:11
#: wysiwyg_editor.module:11
msgid "Enable WYSIWYG Editor to your site."
msgstr "Sitenizde görsel düzenleyiciyi etkinleştirin."
#: tinymce.module:28
#: tinymce.info:0
#: wysiwyg_editor.module:28
#: wysiwyg_editor.info:0
msgid "TinyMCE"
msgstr "TinyMCE"
#: tinymce.module:29
#: wysiwyg_editor.module:29
msgid "Tinymce settings."
msgstr "Tinymce ayarları"
#: tinymce.module:45
#: wysiwyg_editor.module:45
msgid "Basic settings"
msgstr "Temel ayarlar"
#: tinymce.module:52
#: wysiwyg_editor.module:52
msgid "Editor Mode"
msgstr "Düzenleyici kipi"
#: tinymce.module:54
#: wysiwyg_editor.module:54
msgid "Full"
msgstr "Tam"
#: tinymce.module:54
#: wysiwyg_editor.module:54
msgid "Compact"
msgstr "Sade"
#: tinymce.module:54
#: wysiwyg_editor.module:54
msgid "Simple"
msgstr "Basit"
#: tinymce.module:55
#: wysiwyg_editor.module:55
msgid "FULL: enable all TinyMCE features. COMPACT: enable most used features. SIMPLE: just enable simple editor.<hr>"
msgstr "TAM: tüm TinyMCE özellekleri etkinleştirilir. SADE: en çok kullanılan özellikler etkinleştirilir. BASİT: sadece temel özellikler etkinleştirilir.<hr>"
#: tinymce.module:60
#: wysiwyg_editor.module:60
msgid "Enable TinyMCE for"
msgstr "TinyMCE etkin olsun"
#: tinymce.module:62
#: wysiwyg_editor.module:62
msgid "Edit-body only"
msgstr "Sadece gövde için (Edit-body)"
#: tinymce.module:62
#: wysiwyg_editor.module:62
msgid "Edit-comment only"
msgstr "Sadece yorum için (Edit-comment)"
#: tinymce.module:62
#: wysiwyg_editor.module:62
msgid "Both"
msgstr "Her ikisi için"
#: tinymce.module:63
#: wysiwyg_editor.module:63
msgid "If you want TinyMCE available for textarea of edit-body and comment then you should select <b>Both</b> option."
msgstr "Eğer TinyMCE'nin hem içerik gövdesinde hem de yorumlarda etkin olmasını istiyorsanız <b>Her ikisi için</b> seçeneğini seçin."
#: tinymce.module:68
#: wysiwyg_editor.module:68
msgid "Enable TinyMCE for this node types"
msgstr "TinyMCE eklentisini bu düğüm çeşitleri için etkinleştir"
#: tinymce.module:70
#: wysiwyg_editor.module:70
msgid "Node type in case-sensitive name, i.e: page,story,data_product,blog"
msgstr "İçerik türü, küçük büyük harf duyarlı. ör: page, story, data_product, blog"
#: tinymce.module:0
#: tinymce.info:0
msgid "tinymce"
msgstr "tinymce"
#: wysiwyg_editor.module:0
#: wysiwyg_editor.info:0
msgid "wysiwyg_editor"
msgstr "wysiwyg_editor"
; $Id$
name = TinyMCE
description = The most popular WYSIWYG editor for advanced content editing.
name = Wysiwyg Editor
description = Allows users to edit contents with client-side editors.
......@@ -2,56 +2,67 @@
// $Id$
/**
* Implementation of hook_install()
*
* This will automatically install the database tables for the TinyMCE module for both the MySQL and PostgreSQL databases.
*
* If you are using another database, you will have to install the tables by hand, using the queries below as a reference.
*
* Note that the curly braces around table names are a drupal-specific feature to allow for automatic database table prefixing,
* and will need to be removed.
* Implementation of hook_install().
*/
function tinymce_install() {
function wysiwyg_editor_install() {
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
db_query("CREATE TABLE {tinymce_settings} (
name varchar(128) NOT NULL default '',
settings text,
PRIMARY KEY (name)
) /*!40100 DEFAULT CHARACTER SET utf8 */;");
db_query("CREATE TABLE {tinymce_role} (
name varchar(128) NOT NULL default '',
rid tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (name,rid)
) /*!40100 DEFAULT CHARACTER SET utf8 */;");
db_query("CREATE TABLE {wysiwyg_editor_profile} (
name varchar(128) NOT NULL default '',
settings text,
PRIMARY KEY (name)
) /*!40100 DEFAULT CHARACTER SET utf8 */");
db_query("CREATE TABLE {wysiwyg_editor_role} (
name varchar(128) NOT NULL default '',
rid tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (name,rid)
) /*!40100 DEFAULT CHARACTER SET utf8 */");
break;
case 'pgsql':
db_query("CREATE TABLE {tinymce_settings} (
name varchar(128) NOT NULL default '',
settings text,
PRIMARY KEY (name)
);");
db_query("CREATE TABLE {tinymce_role} (
name varchar(128) NOT NULL default '',
rid smallint NOT NULL default '0',
PRIMARY KEY (name,rid)
);");
db_query("CREATE TABLE {wysiwyg_editor_profile} (
name varchar(128) NOT NULL default '',
settings text,
PRIMARY KEY (name)
)");
db_query("CREATE TABLE {wysiwyg_editor_role} (
name varchar(128) NOT NULL default '',
rid smallint NOT NULL default '0',
PRIMARY KEY (name,rid)
)");
break;
}
// Import data from old editor modules.
wysiwyg_editor_migrate_tinymce();
}
function tinymce_update_1() {
return _system_update_utf8(array('tinymce_settings', 'tinymce_role'));
/**
* Implementation of hook_uninstall()
*/
function wysiwyg_editor_uninstall() {
db_query('DROP TABLE {wysiwyg_editor_profile}');
db_query('DROP TABLE {wysiwyg_editor_role}');
}
/**
* Implementation of hook_uninstall()
* Migrate from TinyMCE.
*/
function tinymce_uninstall() {
db_query('DROP TABLE {tinymce_settings}');
db_query('DROP TABLE {tinymce_role}');
function wysiwyg_editor_migrate_tinymce() {
if (db_table_exists('tinymce_settings')) {
$schema = db_result(db_query("SELECT schema_version FROM {system} WHERE name = 'tinymce'"));
if ($schema >= 1) {
// Import TinyMCE settings.
db_query('INSERT INTO {wysiwyg_editor_profile} SELECT * FROM {tinymce_settings}');
// Import TinyMCE profile role assignments.
db_query('INSERT INTO {wysiwyg_editor_role} SELECT * FROM {tinymce_role}');
// Disable TinyMCE module.
module_disable(array('tinymce'));
}
else {
drupal_set_message(t('To migrate your existing TinyMCE settings to Wysiwyg Editor, please update TinyMCE module to the latest official release, and re-install Wysiwyg Editor module.'));
}
}
}
// $Id$
/**
* Initialize each tinyMCE configuration.
* Initialize each Wysiwyg Editor configuration.
*
* This function needs to be called before the page is fully loaded, as
* calling tinyMCE.init() after the page is loaded breaks in IE 6.
*/
Drupal.tinymceInit = function () {
for (var theme in Drupal.settings.tinymce.configs) {
Drupal.wysiwygEditorInit = function () {
for (var theme in Drupal.settings.wysiwygEditor.configs) {
// Clone so we are not passing by reference. Otherwise the
// settings will get overwritten.
var config = Drupal.tinymceCloneObject(Drupal.settings.tinymce.configs[theme]);
var config = Drupal.wysiwygEditorCloneObject(Drupal.settings.wysiwygEditor.configs[theme]);
tinyMCE.init(config);
}
}
/**
* Attach tinyMCE to textareas.
* Attach Wysiwyg Editor to textareas.
*
* This function can be called to process AJAX-loaded content.
*/
Drupal.tinymceAttach = function () {
for (var theme in Drupal.settings.tinymce.configs) {
var config = Drupal.tinymceCloneObject(Drupal.settings.tinymce.configs[theme]);
Drupal.wysiwygEditorAttach = function () {
for (var theme in Drupal.settings.wysiwygEditor.configs) {
var config = Drupal.wysiwygEditorCloneObject(Drupal.settings.wysiwygEditor.configs[theme]);
// Set configuration options for this theme.
for (var setting in config) {
tinyMCE.settings[setting] = config[setting];
}
$('textarea.tinymce-' + theme + ':not(.tinymce-processed)').each(function () {
$('textarea.wysiwyg-' + theme + ':not(.wysiwyg-processed)').each(function () {
// Show toggle link if set.
if (Drupal.settings.tinymce.showToggle) {
Drupal.tinymceAttachToggleLink(this, theme);
if (Drupal.settings.wysiwygEditor.showToggle) {
Drupal.wysiwygEditorAttachToggleLink(this, theme);
}
// Attach tinyMCE control if default is on.
if (Drupal.settings.tinymce.status) {
// Attach Wysiwyg Editor control if default is on.
if (Drupal.settings.wysiwygEditor.status) {
tinyMCE.execCommand('mceAddControl', true, this.id);
}
$(this).addClass('tinymce-processed');
$(this).addClass('wysiwyg-processed');
});
}
}
/**
* Toggle the tinyMCE control and related link text for a textarea.
* Toggle the Wysiwyg Editor control and related link text for a textarea.
*/
Drupal.tinymceToggle = function (id, theme) {
Drupal.wysiwygEditorToggle = function (id, theme) {
if (tinyMCE.getEditorId(id) == null) {
var config = Drupal.tinymceCloneObject(Drupal.settings.tinymce.configs[theme]);
var config = Drupal.wysiwygEditorCloneObject(Drupal.settings.wysiwygEditor.configs[theme]);
// Set configuration options for this theme.
for (var setting in config) {
tinyMCE.settings[setting] = config[setting];
}
tinyMCE.addMCEControl($('#' + id).get(0), id);
$('#wysiwyg4' + id)
.html(Drupal.settings.tinymce.disable)
.html(Drupal.settings.wysiwygEditor.disable)
.blur();
}
else {
tinyMCE.removeMCEControl(tinyMCE.getEditorId(id));
$('#wysiwyg4' + id)
.html(Drupal.settings.tinymce.enable)
.html(Drupal.settings.wysiwygEditor.enable)
.blur();
}
}
......@@ -67,16 +67,16 @@ Drupal.tinymceToggle = function (id, theme) {
/**
* Append toggle link to textarea.
*/
Drupal.tinymceAttachToggleLink = function (elt, theme) {
Drupal.wysiwygEditorAttachToggleLink = function (elt, theme) {
if (typeof(document.execCommand) == 'undefined') {
$(elt).after('<div style="font-size:x-small">' + Drupal.settings.tinymce.noWysiwyg + '</div>');
$(elt).after('<div style="font-size:x-small">' + Drupal.settings.wysiwygEditor.noWysiwyg + '</div>');
}
else {
var text = document.createTextNode(Drupal.settings.tinymce.status ? Drupal.settings.tinymce.disable : Drupal.settings.tinymce.enable);
var text = document.createTextNode(Drupal.settings.wysiwygEditor.status ? Drupal.settings.wysiwygEditor.disable : Drupal.settings.wysiwygEditor.enable);
var a = document.createElement('a');
$(a)
.click(function() {
Drupal.tinymceToggle(elt.id, theme);
Drupal.wysiwygEditorToggle(elt.id, theme);
})
.attr('id', 'wysiwyg4' + elt.id)
.css('cursor', 'pointer')
......@@ -87,11 +87,11 @@ Drupal.tinymceAttachToggleLink = function (elt, theme) {
}
}
Drupal.tinymceCloneObject = function (obj) {
Drupal.wysiwygEditorCloneObject = function (obj) {
var clone = {};
for (i in obj) {
if ((typeof obj[i] == 'object') || (typeof obj[i] == 'array')) {
clone[i] = Drupal.tinymceCloneObject(obj[i]);
clone[i] = Drupal.wysiwygEditorCloneObject(obj[i]);
}
else {
clone[i] = obj[i];
......@@ -104,10 +104,10 @@ Drupal.tinymceCloneObject = function (obj) {
* Global killswitch.
*/
if (Drupal.jsEnabled) {
$(document).ready(Drupal.tinymceAttach);
$(document).ready(Drupal.wysiwygEditorAttach);
}
/**
* Call tinyMCE initialization.
* Initialize Wysiwyg Editor.
*/
Drupal.tinymceInit();
Drupal.wysiwygEditorInit();
This diff is collapsed.
......@@ -7,7 +7,7 @@
* can be overridden by each Drupal theme.
*/
function _tinymce_plugins() {
function _wysiwyg_editor_plugins() {
/**
* A couple of notes about adding plugins.
......@@ -88,7 +88,7 @@ $plugins['searchreplace'] = array();
$plugins['searchreplace']['theme_advanced_buttons2'] = array('search', 'replace');
if (is_dir(drupal_get_path('module', 'tinymce') . '/tinymce/jscripts/tiny_mce/plugins/spellchecker/')) {
if (is_dir(drupal_get_path('module', 'wysiwyg_editor') . '/tinymce/jscripts/tiny_mce/plugins/spellchecker/')) {
$plugins['spellchecker'] = array();
$plugins['spellchecker']['theme_advanced_buttons3'] = array('spellchecker');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment