Jump to content
Sign in to follow this  
azbukait

борьба с кавычками

Recommended Posts

Здравствуйте!

 

Видел тут похожую проблему, но связанную с описанием товара в админке. У меня проблема в следующем

1. Создаю статью

2. В нее вставляю код

<table width="980" border="0" cellspacing="5" cellpadding="5">
  <tr>
    <td width="44%">
 

3. Получаю в итоге такую вот ерунду после сохранения статьи.

<table border="\"0\"" cellpadding="\"5\"" cellspacing="\"5\"" width="\"980\"">
	<tbody>
		<tr>
			<td width="\"44%\"">

Как побороть?

Версия 1.5.5.1.2 ocStore

Share this post


Link to post
Share on other sites

Здравствуйте!

 

Видел тут похожую проблему, но связанную с описанием товара в админке. У меня проблема в следующем

1. Создаю статью

2. В нее вставляю код

<table width="980" border="0" cellspacing="5" cellpadding="5">
  <tr>
    <td width="44%">
 

3. Получаю в итоге такую вот ерунду после сохранения статьи.

<table border="\"0\"" cellpadding="\"5\"" cellspacing="\"5\"" width="\"980\"">
	<tbody>
		<tr>
			<td width="\"44%\"">

Как побороть?

Версия 1.5.5.1.2 ocStore

Попробуй в папке cEditor найти и добавить в файл config.js

CKEDITOR.config.indentClasses = ["ul-grey", "ul-red", "text-red", "ul-content-red", "circle", "style-none", "decimal", "paragraph-portfolio-top", "ul-portfolio-top", "url-portfolio-top", "text-grey"];
    CKEDITOR.config.protectedSource.push(/<(style)[^>]*>.*<\/style>/ig);// разрешить теги <style>
    CKEDITOR.config.protectedSource.push(/<(script)[^>]*>.*<\/script>/ig);// разрешить теги <script>
    CKEDITOR.config.protectedSource.push(/<\?[\s\S]*?\?>/g);// разрешить php-код
    CKEDITOR.config.protectedSource.push(/<!--dev-->[\s\S]*<!--\/dev-->/g);
    CKEDITOR.config.allowedContent = true; /* все теги */

Share this post


Link to post
Share on other sites

 

Попробуй в папке cEditor найти и добавить в файл config.js

CKEDITOR.config.indentClasses = ["ul-grey", "ul-red", "text-red", "ul-content-red", "circle", "style-none", "decimal", "paragraph-portfolio-top", "ul-portfolio-top", "url-portfolio-top", "text-grey"];
    CKEDITOR.config.protectedSource.push(/<(style)[^>]*>.*<\/style>/ig);// разрешить теги <style>
    CKEDITOR.config.protectedSource.push(/<(script)[^>]*>.*<\/script>/ig);// разрешить теги <script>
    CKEDITOR.config.protectedSource.push(/<\?[\s\S]*?\?>/g);// разрешить php-код
    CKEDITOR.config.protectedSource.push(/<!--dev-->[\s\S]*<!--\/dev-->/g);
    CKEDITOR.config.allowedContent = true; /* все теги */

А в какое место - пробую вставить - не работает, хотя думаю это то, что мне необходимо

/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/

CKEDITOR.editorConfig = function( config )
{
	// Define changes to default configuration here. For example:
	// config.language = 'fr';
	// config.uiColor = '#AADC6E';
	/*
	config.filebrowserBrowseUrl = 'index.php?route=common/filemanager';
	config.filebrowserImageBrowseUrl = 'index.php?route=common/filemanager';
	config.filebrowserFlashBrowseUrl = 'index.php?route=common/filemanager';
	config.filebrowserUploadUrl = 'index.php?route=common/filemanager';
	config.filebrowserImageUploadUrl = 'index.php?route=common/filemanager';
	config.filebrowserFlashUploadUrl = 'index.php?route=common/filemanager';		
	*/
	
	config.filebrowserWindowWidth = '800';
	config.filebrowserWindowHeight = '500';

	config.resize_enabled = false;
	
	config.htmlEncodeOutput = false;
	config.entities = false;
	
	config.toolbar = 'Custom';

	config.toolbar_Custom = [
		['Source'],
		['Maximize'],
		['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
		['NumberedList','BulletedList','-','Outdent','Indent'],
		['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
		['SpecialChar'],
		'/',
		['Undo','Redo'],
		['Font','FontSize'],
		['TextColor','BGColor'],
		['Link','Unlink','Anchor'],
		['Image','Table','HorizontalRule']
	];
	
	config.toolbar_Full = [
		['Source','-','Save','NewPage','Preview','-','Templates'],
		['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print', 'SpellChecker', 'Scayt'],
		['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
		['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'],
		'/',
		['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
		['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],
		['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
		['Link','Unlink','Anchor'],
		['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'],
		'/',
		['Styles','Format','Font','FontSize'],
		['TextColor','BGColor'],
		['Maximize', 'ShowBlocks','-','About']
	];


CKEDITOR.config.indentClasses = ["ul-grey", "ul-red", "text-red", "ul-content-red", "circle", "style-none", "decimal", "paragraph-portfolio-top", "ul-portfolio-top", "url-portfolio-top", "text-grey"];
    CKEDITOR.config.protectedSource.push(/<(style)[^>]*>.*<\/style>/ig);// разрешить теги <style>
    CKEDITOR.config.protectedSource.push(/<(script)[^>]*>.*<\/script>/ig);// разрешить теги <script>
    CKEDITOR.config.protectedSource.push(/<\?[\s\S]*?\?>/g);// разрешить php-код
    CKEDITOR.config.protectedSource.push(/<!--dev-->[\s\S]*<!--\/dev-->/g);
    CKEDITOR.config.allowedContent = true; /* все теги */
};

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.