Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#12424 closed Bug (invalid)

Conflict with Toolbar and Templates...

Reported by: Angel Owned by:
Priority: Normal Milestone:
Component: UI : Toolbar Version:
Keywords: Cc: angelherriv@…

Description

I have detected a bug that can be reproduced easily. The code below is a reduction of the sample code: "inlineall.html".

The bug is: If you run the below code without setting your own toolbar configuration, I mean NOT setting: "editor.config.toolbar", then the templates divisions are inserted properly. But if you set the previous configuration for example the toolbar buttons below, then the templates divisions are not inserted properly and some <br /> tags are inserted instead.

If you have a patch or workaround for this bug, please, let me know, because it is very important for me because soon I have to deliver a job where I used this fantastic tool you created. Congratulations!

Regards, Angel.

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>Massive inline editing &mdash; CKEditor Sample</title>
	<script src="../ckeditor.js"></script>
	<script>
		CKEDITOR.on('instanceCreated', function(event) {
			var editor = event.editor;
			editor.config.toolbar = [[ 'Styles', 'Templates' ]];
		});
	</script>
	<link href="sample.css" rel="stylesheet">
</head>
<body>
	<div contenteditable="true">
		<p>
			Lorem ipsum dolor sit amet enim. Etiam ullamcorper. Suspendisse a pellentesque dui, non felis. Maecenas malesuada elit lectus felis, malesuada ultricies.
		</p>
		<p>
			Curabitur et ligula. Ut molestie a, ultricies porta urna. Vestibulum commodo volutpat a, convallis ac, laoreet enim. Phasellus fermentum in, dolor. Pellentesque facilisis. Nulla imperdiet sit amet magna. Vestibulum dapibus, mauris nec malesuada fames ac.
		</p>
	</div>
</body>
</html>

Change History (5)

comment:1 Changed 5 years ago by Piotrek Koszuliński

Keywords: toolbar templates removed
Resolution: invalid
Status: newclosed
Version: 4.4.4

I don't understand what problem do you encounter. However, I noticed that you set configuration incorrectly, so it's very likely the cause of your issues. The rule number one is - configuration must be set before editor is ready.

See - http://docs.ckeditor.com/#!/guide/dev_configuration - and let us know if it helped. We can reopen the ticket if there's a real bug.

comment:2 Changed 5 years ago by Angel

I did the following minor changes you can see below, where I set the configuration before create the instance of the editor and the behavior is exactly the same as before. If I comment the "toolbar" line, then the template is inserted correctly, but if I specify a toolbar configuration then the template is inserted incorrectly I mean <br /> tags are inserted instead of a table.

Thank you for your attention.

Regards!

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Massive inline editing &mdash; CKEditor Sample</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript" src="../ckeditor.js"></script>
<script type="text/javascript">

CKEDITOR.disableAutoInline = true;

$(function(){
	var config = {
		toolbar: [[ "Styles", "Templates" ]]
	}
	CKEDITOR.inline("theContent", config, "");
});

</script>
<link href="sample.css" rel="stylesheet">
</head>
<body>
	<div id="theContent" contenteditable="true">
		<p>
			Lorem ipsum dolor sit amet enim. Etiam ullamcorper. Suspendisse a pellentesque dui, non felis. Maecenas malesuada elit lectus felis, malesuada ultricies.
		</p>
		<p>
			Curabitur et ligula. Ut molestie a, ultricies porta urna. Vestibulum commodo volutpat a, convallis ac, laoreet enim. Phasellus fermentum in, dolor. Pellentesque facilisis. Nulla imperdiet sit amet magna. Vestibulum dapibus, mauris nec malesuada fames ac.
		</p>
	</div>
</body>
</html>
Last edited 5 years ago by Angel (previous) (diff)

comment:3 in reply to:  1 Changed 5 years ago by Angel

Replying to Reinmar:

I don't understand what problem do you encounter. However, I noticed that you set configuration incorrectly, so it's very likely the cause of your issues. The rule number one is - configuration must be set before editor is ready.

See - http://docs.ckeditor.com/#!/guide/dev_configuration - and let us know if it helped. We can reopen the ticket if there's a real bug.

It didn't work. I leaved a comment above. Thanks.

Last edited 5 years ago by Angel (previous) (diff)

comment:4 Changed 5 years ago by Piotrek Koszuliński

Ok, now I get it. So the problem is ACF, because template plugin is not synchronised with it (and can't be easily because it has an outdated architecture). Anyway, this issue is reported somewhere, but you'll be interested in configuring content filtering.

Last edited 5 years ago by Piotrek Koszuliński (previous) (diff)

comment:5 in reply to:  4 Changed 5 years ago by Angel

Replying to Reinmar:

Ok, now I get it. So the problem is ACF, because template plugin is not synchronised with it (and can't be easily because it has an outdated architecture). Anyway, this issue is reported somewhere, but you'll be interested in configuring content filtering.

Thank you very much Reinmar, you saved my day! ;)

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy