Post by HAO » Thu Aug 15, 2019 10:33 pm

When I copy and paste the HTML source code into the text area, As long as I did not press the "Code View" button, the HTML source code I entered could not be Save, Does anyone know how to fix this problem?
Last edited by HAO on Sun Sep 01, 2019 7:08 am, edited 1 time in total.

HAO
Active Member

Posts

Joined
Fri Jun 03, 2011 2:52 pm

Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by HAO » Fri Aug 16, 2019 6:11 am

Thank you for your reply!

I have tested it, but the problem continues to occur.

HAO
Active Member

Posts

Joined
Fri Jun 03, 2011 2:52 pm

Post by ADD Creative » Fri Aug 16, 2019 5:54 pm

Try clearing your modification, theme and browser caches.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by HAO » Sat Aug 31, 2019 5:28 am

This is my code:

Code: Select all

					return button.render();
				}
			}
		});
	});

	$('.note-codable').on('blur', function() {
		var sn = $(this).closest('.note-editor').siblings('textarea');

		if (sn.summernote('codeview.isActivated')) {
			sn.val(sn.summernote('code'));
		}
	});
});
You told me the steps, I have tried countless times.

But the problem still exists, How can I solve it?

HAO
Active Member

Posts

Joined
Fri Jun 03, 2011 2:52 pm

Post by ADD Creative » Sun Sep 01, 2019 4:48 am

I've just checked and it seems that 3.0.2.0 uses a different version of Summernote that includes CodeMirror. which means the code posted will not work.

Just before the last }); at the end of admin/view/javascript/summernote/opencart.js try.

Code: Select all

	$('[data-toggle=\'summernote\']').each(function() {
		sn = $(this);

		sn.on('summernote.codeview.toggled', function() {
			var cm = $('textarea.note-codable').data('cmEditor');

			cm.on('blur', function() {
				sn.val(cm.getValue());
			});
		});
	});
Last edited by ADD Creative on Tue Jan 07, 2020 11:03 pm, edited 1 time in total.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by HAO » Sun Sep 01, 2019 7:08 am

Thank you for your help!

The problem has been solved!

HAO
Active Member

Posts

Joined
Fri Jun 03, 2011 2:52 pm
Who is online

Users browsing this forum: No registered users and 110 guests