Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Модуль TinyMCE отключает HTML редактирование атрибутов


Akretman
 Share

Recommended Posts

Господа, добрый день.

Столкнулся с такой проблемой.

Модуль HTML атрибуты работает отлично до установки редактора TinyMCE, потом подсказка на атрибутах работает, п HTML редактирование при двойном нажатии не срабатывает.

Я подозреваю, что модуль HTML атрибуты работает на стандартном редакторе, TinyMCE его вырубает, а сам вместо него в этот модуль не встаёт.

Кто-то сталкивался с такой проблемой?

Прилагаю код модуля HTML атрибуты

<?xml version="1.0" encoding="utf-8"?>
<modification>
	<name>HTML Product Attribute</name>
	<code>html_product_attribute</code>
	<version>1.0</version>
	<author>https://ocmod.net</author>
	<link>https://ocmod.net</link>

	<file path="admin/view/template/catalog/product_form.tpl">
		<operation>
			<search><![CDATA[
			<?php echo $footer; ?>
			]]></search>
			<add position="before"><![CDATA[
			<script type="text/javascript"><!--
			function htmlProductAttribute(textarea) {
				if (!textarea.hasClass('htmlProductAttribute')) {
					textarea.addClass('htmlProductAttribute');
					textarea.tooltip({'title': 'Двойной клик для HTML'});
					textarea.on('dblclick', function() {
						textarea.summernote({height: 100});
						$('#attribute .note-editor.note-frame.panel').css('margin-bottom', '1px');
					});
				}
			}

			$('#attribute textarea[name^="product_attribute["]').each(function(i, e) {
			   htmlProductAttribute($(this));
			});

			$('#attribute').on('click', function() {
				$(this).find('textarea[name^="product_attribute["]').each(function(i, e) {
					htmlProductAttribute($(this));
				});
			});
			//--></script>
			]]></add>
		</operation>
	</file>
	
	<file path="catalog/model/catalog/product.php">
		<operation>
			<search><![CDATA[
			$product_attribute_data[] = array(
			]]></search>
			<add position="before"><![CDATA[
			$product_attribute['text'] = html_entity_decode($product_attribute['text'], ENT_QUOTES, 'UTF-8');
			]]></add>
		</operation>
	</file>
	
</modification>

 

Link to comment
Share on other sites


15.12.2022 в 14:37, Tom сказал:

Модуль с вареза. Да и зачем менять шило на мыло (саммернот на тинимайс)...

Модуль TineMCE куплен. А стандартный редактор довольно стрёмный =(

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

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.