Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Surfalot und CK-Editor


Küchenchef

Recommended Posts

Hat jemand das Surfalot  und CK-Editor installiert ?

Hier beisen sich die zwei Versionen.

Sobald CK installiert ist funzt Surfalot WYSIWYG nicht mehr.

 

Der Fehler wird durch dieses script erzeugr:

<script type="text/javascript" src="<?php echo tep_href_link('ext/ckeditor/ckeditor.js'); ?>"></script>
<!-- If you would rather use ckeditor.js file from a CDN uncomment the line below and comment the line above - if the version number has changed remember to change the version number - you'll actually find the line of code on the ck editor web site for your version -->
<!-- <script src="//cdn.ckeditor.com/4.4.4/full/ckeditor.js"></script> -->
<script type="text/javascript" src="<?php echo tep_href_link('ext/ckeditor/adapters/jquery.js'); ?>"></script>
<script type="text/javascript">
$(function() {
var $editors = $('textarea');
if ($editors.length) {
$editors.each(function() {
var editorID = $(this).attr("id");
var instance = CKEDITOR.instances[editorID];
if (instance) { CKEDITOR.remove(instance); }
CKEDITOR.replace(editorID);
});
}
});
</script>

 

Für jede Hilfe bin ich dankbar.

PS. Es geht um 2.3.4 Bootstrap EDGE

Link to comment
Share on other sites

Surfalot benutzt TinyMCE, der beisst sich mit CkEditor.

Mein Vorschlag Surfalot Editor auf CkEditor umstellen oder umgekehrt.

Link to comment
Share on other sites

Danke, ja habe ich schon auch festgestellt.
Das Problem ist, dass ich TinyMCE installiert habe und dann hat garnichts mehr funktioniert. Weder Surfalot noch die Produktbeschreibung war erreichbar.

Bei TinyMCE genauso wie bei CK ist das script in der template_top dafür verantwortlich, dass die Anbindung nicht so ganz möchte wie ich es will. Ich hatte mir schon die Dateien von Surf angesehen ob vieleicht den Editor der schon vorhanden ist irgendwie zu verbinden doch leider schaff ich es nicht. 

Link to comment
Share on other sites

Entferne die Einbindung in der template_top.php beider Editoren. Binde die Editioren jeweils in der Datei ein, in der er benötigt wird.

z. b.: Für die Produktbearbeitung (CKEditor) /catalog/admin/categories.php

Somit wird der jeweilige Editor nur da geladen wo er benötigt wird.

Link to comment
Share on other sites

<?php
/*
  $Id$

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2014 osCommerce

  Released under the GNU General Public License
*/
?>
<!DOCTYPE html>
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="noindex,nofollow">
<title><?php echo TITLE; ?></title>
<base href="<?php echo ($request_type == 'SSL') ? HTTPS_SERVER . DIR_WS_HTTPS_ADMIN : HTTP_SERVER . DIR_WS_ADMIN; ?>" />
<!--[if IE]><script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/flot/excanvas.min.js', '', 'SSL'); ?>"></script><![endif]-->
<link rel="stylesheet" type="text/css" href="<?php echo tep_catalog_href_link('ext/jquery/ui/redmond/jquery-ui-1.10.4.min.css', '', 'SSL'); ?>">
<script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/jquery/jquery-2.2.3.min.js', '', 'SSL'); ?>"></script>
<script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/jquery/ui/jquery-ui-1.10.4.min.js', '', 'SSL'); ?>"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">

<?php
  if (tep_not_null(JQUERY_DATEPICKER_I18N_CODE)) {
?>
<script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/jquery/ui/i18n/jquery.ui.datepicker-' . JQUERY_DATEPICKER_I18N_CODE . '.js', '', 'SSL'); ?>"></script>
<script type="text/javascript">
$.datepicker.setDefaults($.datepicker.regional['<?php echo JQUERY_DATEPICKER_I18N_CODE; ?>']);
</script>
<?php
  }
?>
<script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/flot/jquery.flot.min.js', '', 'SSL'); ?>"></script>
<script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/flot/jquery.flot.time.min.js', '', 'SSL'); ?>"></script>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
<link rel="stylesheet" href="includes/navigation/sidebar.css">
<script type="text/javascript" src="includes/general.js"></script>

<?php
//this code block is optional - if you want the ability to turn the editor on and off in admin add this - its not necessary and is not needed to make the editor work

if (!defined('USE_CKEDITOR_ADMIN_TEXTAREA')) {
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, set_function) values ('', '<strong>HTML-Editor Wechselschalter [ * Bitte lesen * ]</strong>', 'USE_CKEDITOR_ADMIN_TEXTAREA','true','Sobald Sie Ihre Informationsseiten bearbeiten wollen, muss dieser HTML-Editor unbedingt auf (false) gesetzt werden.',1,99,now(),'tep_cfg_select_option(array(\'true\', \'false\'),' )");
define ('USE_CKEDITOR_ADMIN_TEXTAREA','true');
}
if (USE_CKEDITOR_ADMIN_TEXTAREA == "true") {
?>


<script type="text/javascript" src="<?php echo tep_href_link('ext/ckeditor/ckeditor.js'); ?>"></script>
<!-- If you would rather use ckeditor.js file from a CDN uncomment the line below and comment the line above - if the version number has changed remember to change the version number - you'll actually find the line of code on the ck editor web site for your version -->
<!-- <script src="//cdn.ckeditor.com/4.4.4/full/ckeditor.js"></script> -->
<script type="text/javascript" src="<?php echo tep_href_link('ext/ckeditor/adapters/jquery.js'); ?>"></script>
<script type="text/javascript">
$(function() {
var $editors = $('textarea');
if ($editors.length) {
$editors.each(function() {
var editorID = $(this).attr("id");
var instance = CKEDITOR.instances[editorID];
if (instance) { CKEDITOR.remove(instance); }
CKEDITOR.replace(editorID);
});
}
});
</script>

<?php
// the closing brace here forms part of the php code block above
} //if you decide to leave out the php code block above then comment or remove this too
?>

</head>
<body>

<?php require('includes/header.php'); ?>
<div id="contentText" class="container-fluid">
 

 

########################

 

Bei mir hat der CKEditor die anbindung über dieses script  oben admin/includes/application_top.php

Doch der TinyMCE ist direkt über das Surfalot Modul integriert und hier komme ich leider nicht weiter

Link to comment
Share on other sites

×
×
  • Create New...