Account created on 8 April 2016, about 8 years ago
#

Merge Requests

Recent comments

🇩🇪Germany dbielke1986

@porchlight

You are absolutely right. All the points mentioned are correct and must be taken into account.
And you are also right to say that this is a CKEditor issue that we cannot solve on the module side.

The

is a WorkAround that at least helps to get out of the

.

I would close the issue as we cannot make any code changes and it is not a bug in the module.
Would that be ok for you? If not, please just open it again.

🇩🇪Germany dbielke1986

Hi porchlight,

Can you please check the linked items? I already mentioned the following answer in issue 3402691 💬 Inserted HTML template goes wrong Closed: works as designed .

The reason for this is a standard behavior of the CKEditor. If you insert the heading, you remain in the current DIV.

You can reproduce this by simply switching to a new line after inserting the first heading and continuing to write there. Here you remain in the current DIV. The following template is therefore also inserted within the first DIV.

You can solve this by adapting your templates as follows (add the "<p>&nbsp;</p>" after the template-div):

[
    {
        "title": "Heading2",
        "icon": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1. 1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z\"/></svg>",
        "description": "Insert heading2 tags for this site.",
        "html": "<div class=\"o-title__border\"><h2 class=\"o-title__xl\">Heading2</h2></div><p>&nbsp;</p>"
    },
    {
        "title": "Heading3",
        "icon": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1. 1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z\"/></svg>",
        "description": "Insert heading3 tags for this site.",
        "html": "<div class=\"o-title__border2\"><h3 class=\"o-title__l\">Headingr3</h3></div><p>&nbsp;</p>"
    } 
] 
🇩🇪Germany dbielke1986

@sfm1977:

Great! But what I haven't quite understood yet:
Is the problem solved now, or do we have to change something in the code?

Was it the linked item, or was the json as such faulty that you included?

BR

🇩🇪Germany dbielke1986

@justcaldwell

Unfortunately, I cannot confirm this. I used the dev version of “Development version: 3.0.x-dev updated 20 Dec 2023 at 17:25 UTC” and the name=" tag is removed.

🇩🇪Germany dbielke1986

Is working for me since a few months.
I think we can change to RTBC

🇩🇪Germany dbielke1986

alpha2 is not working for us.
The name attribute will be removed as soon as the Anchor Link Module is activated :-(

🇩🇪Germany dbielke1986

I would also be interested in testing this upgrade path.
We will do some tests as soon as Drupal 10.3 is released, and you give us the go to test.

🇩🇪Germany dbielke1986

Thank you so much @shelane.

The fix and the new release is working great!

🇩🇪Germany dbielke1986

Hi sfm1977,

could this be related to 3438983 🐛 Call to template json file broken if site is in sub-directory Active ?
I think the problem is the template file, which could not be found/resolved in the given path.
Did you change the delivered example json?

BR
Daniel

🇩🇪Germany dbielke1986

Just created a fork and an MR with the changes of #2 Set the default filter to "Strip Tags" Needs review

Please review and test.

🇩🇪Germany dbielke1986

I see it the same way. Completely removing the content is fatal for many use cases.

Regarding the actual problem, please take a look at the linked items.

🇩🇪Germany dbielke1986

Good question, indeed 😅
I can not give you a good reason for that- maybe we should consider to store this data in the db.

Br

🇩🇪Germany dbielke1986

Great! Then everything should be fine ☺️

🇩🇪Germany dbielke1986

Already discussed here:

https://www.drupal.org/project/ckeditor5_template/issues/3402691 💬 Inserted HTML template goes wrong Closed: works as designed

🇩🇪Germany dbielke1986

Are you really using version 8.x-6.0?
Can you please check with the latest dev version of 7.0.0? That should resolve the problem.

Version 8.x-6.0 is a version that is no longer supported

🇩🇪Germany dbielke1986

Maybe related to #3420524 🐛 Error when the theme logo is not set Fixed

Can you please test the latest dev version?

🇩🇪Germany dbielke1986

Great! Thanks - is merged to dev and will be available with the next release.

🇩🇪Germany dbielke1986

Great! Is working with the dev version.

🇩🇪Germany dbielke1986

By the way:
The decision whether to use "CKEditor" or "CKEditor5" or "CKEditor 5" is based on the following official article:
https://www.drupal.org/docs/core-modules-and-themes/core-modules/ckeditor-5-module/upgrading-modules-extending-ckeditor-4-to-support-ckeditor-5

It refers to the following starter package:
CKEditor 5 Dev Tools

The info.yml contains:
package: CKEditor 5

So we will go with this package name.

🇩🇪Germany dbielke1986

It is not working as expected because the button is getting the class, but not the div next to it.
I am on it.

🇩🇪Germany dbielke1986

@mnico,

Yes, you are absolutely correct. This will be done by @vincent.hoehn.

I just sent the changed code to him so that he can check and pack afterwards.

Br

🇩🇪Germany dbielke1986

I'm not really sure if this will resolve the issue, so I changed the status to "Needs review".

@vincent.hoehn:
Can you please review and check the changes I made?

🇩🇪Germany dbielke1986

Thanks for reporting. I can reproduce this issue and will fix this immediately.

🇩🇪Germany dbielke1986

+1 - would be great to get this feature in a stable release :-)

🇩🇪Germany dbielke1986

Is there a chance to put this in a new release to get this module to a stable version?

🇩🇪Germany dbielke1986

Is there a chance to put this in a new release to get this module to a stable version?

🇩🇪Germany dbielke1986

Would be great to have this feature in a official release

🇩🇪Germany dbielke1986

I think we need an MR for this issue before it should be "Needs review".
Can you push your changes to an MR?

🇩🇪Germany dbielke1986

This "trapped cursor" thing is an issue with CKEditor 5 in general, as reported here in core: [GHS] Allow the cursor to leave divs and other HTML elements at document start or end (3344462) 🐛 [GHS] Allow the cursor to leave s and other HTML elements at document start or end Postponed: needs info and upstream on CKEditor's github: [GHS] It is not possible to leave DIV element #10220 back in 2021 with sadly little movement. It happens whenever you try and use a <div> (or simmilar) in CKEditor 5.

🇩🇪Germany dbielke1986

This "trapped cursor" thing is an issue with CKEditor 5 in general, as reported here in core: [GHS] Allow the cursor to leave divs and other HTML elements at document start or end (3344462) 🐛 [GHS] Allow the cursor to leave s and other HTML elements at document start or end Postponed: needs info and upstream on CKEditor's github: [GHS] It is not possible to leave DIV element #10220 back in 2021 with sadly little movement. It happens whenever you try and use a <div> (or simmilar) in CKEditor 5.

🇩🇪Germany dbielke1986

Oh, yes! Great, because we are currently activating the CKEditor Anchor Link and are also using exactly this functionality.

It would be nice if this fix would be included in an official release.

@edwardsay:
Are you using the alpha2 of the AnchorLink module in CKEditor5 and what are your experiences with it so far?

🇩🇪Germany dbielke1986

Okay, I understand. I hadn't seen that the path would be disabled, please excuse that.

Here it would certainly be relevant whether you then allow both configurations (template file from the template module AND the configured templates from the UI module), or if you only use those of the UI module.

I would almost say that either of the variants should work:
So, if the UI module is active, then only from there. If only the template module is there, then the templates defined in the file.
This would also make deactivating the path logical, as it suggests to the user: "You don't need to do this here anymore, use the newly provided interface to configure your templates"

But you're right:
The automatic takeover should perhaps not be done, but what do you think of a possibility (a button in the configuration interface of your UI module) to take over the templates already configured in the template file. This way it is not automatically adopted - but the user has the option of dragging them over.

The fact is one thing:
As soon as the UI module is there and thus the configuration of the template file in the template module is deactivated, I would no longer offer these templates in the CK Editor, but only those created in the configuration of the UI module.

What do you think about this?

🇩🇪Germany dbielke1986

@Anas_maw

I think that breaks the logic a little.
The best case would be if an activated UI module would deactivate the path input in the template module (deactivate the field) and instead display a link/reference to the new configuration interface.

It would also make sense to take over already configured templates so that a direct changeover would be possible without reconfiguration.

That would be the best and most logical way for me.

🇩🇪Germany dbielke1986

There are several issues:

  1. The help link leads to the attached error (help.png)
  2. The already defined templates are not shown/used after installing this module. See the attached image (templates.png)
  3. The configuration itself cannot be correct because we need the content of a svg (and only svg are supported as icons), not the path

These were only my initial tests. But I think there are some other issues also (using different template files, so the configured file of the main module is not used, even you can configure it,....)

Maybe you can take a look at this and create a stable release. Of course, if everything is working properly, we will link your module in our description!

BR Daniel

🇩🇪Germany dbielke1986

After inserting Template 1, place the cursor immediately after "Heading" and press Enter.

And that's exactly what I meant in the other comment. Here you get stuck in the div. This behavior has nothing to do with this module, but is the CKEditor itself.

You COULD always make a line break before inserting a new template. But this would break the possibility of nested templates, which we should not do as it breaks backward compatibility.

🇩🇪Germany dbielke1986

Dear Kentaono,

Thanks for bringing this issue to our attention. It seems to be a duplicate. Please take a look at this issue and my comment:

https://www.drupal.org/project/ckeditor5_template/issues/3402691#comment... 💬 Inserted HTML template goes wrong Closed: works as designed

If this is not the case, please feel free to reopen this issue again.

BR
Daniel

🇩🇪Germany dbielke1986

We found the reason for this behavior, but currently we do not know how to fix this.
Maybe the community has an idea?

The root is the asynchronous include which we need for the "fetch" function. This again is needed to load the template file dynamically.

https://git.drupalcode.org/project/ckeditor5_template/-/blob/1.0.x/js/ck...

export default class Template extends Plugin {
    async init() {
        const editor = this.editor;
        const template_config = this.editor.config.get('template');
        console.log('Value: ', template_config['file_path']);
        const templateArray = await fetch(template_config['file_path'])
          .then(res => res.json())
          .catch(error => console.log(error));
        editor.ui.componentFactory.add('template', function (locale) {

If we remove the "async" and load the file statically, the duplication of the editor cannot be reproduced.

🇩🇪Germany dbielke1986

I can reproduce this issue. Thank you for reporting and providing the needed information.
We will resolve this issue as soon as possible.

BR

🇩🇪Germany dbielke1986

@Anas_maw

Currently, the 2.x branch seems not to work correctly with this module.
Please let us know as soon as you have a stable release so that we can take a look at the module and link it in our description.

I would like to link only stable releases and modules so that there are no problems on the systems.

BR
Daniel

🇩🇪Germany dbielke1986

Amazing!!!!!🤩

Yes, we will add this information, of cause.
Great idea - I will have a look at this on Monday.

BR

🇩🇪Germany dbielke1986

@Juc1

No, terribly not. No answer, no reply, nothing 😣

🇩🇪Germany dbielke1986

Is there a chance to get this in a new, stable release for group?
We are still on version 1.5 because of this issue.

We need to switch because we moved to PHP8.2

🇩🇪Germany dbielke1986

@thomas.frobieter

Because we are facing the same issue - did you some further research or (how) did you solve the problem?

🇩🇪Germany dbielke1986

@markconroy

This could be the root of this error, or what do you think?

https://www.drupal.org/project/drupal/issues/3397785 🐛 Dialog focus is returned to dialog instead of first tabbable element on dialog AJAX update Fixed

BR

🇩🇪Germany dbielke1986

Please have a look at this issue:

https://www.drupal.org/project/focal_point/issues/3371179#comment-15145534 🐛 Overlay blocking image upload modal in Drupal 10.1 Fixed

🇩🇪Germany dbielke1986

Great, because I am looking for the root of this problem and at the moment I try to analyse which change of drupal core leads to this behavior.

I will link an other issue which shows this problem.

Maybe we can work together to find the reason for this…

🇩🇪Germany dbielke1986

@markconroy

Are you using Drupal 10.2.*, because we have the same so since D10.2.0

🇩🇪Germany dbielke1986

Ok, I will install the paragraph field and try to reproduce the behavior.
I´ll keep you updated.

BR

🇩🇪Germany dbielke1986

I get the same behavior when I use the table button, for example. As soon as a button slides into the extended module, the height is limited.

In my opinion, this is not an issue with the module, but with the theme.

How do you see it?

🇩🇪Germany dbielke1986

Hi trungnt34,

Thanks for reporting this issue!
Can you please check whether the problem also occurs when the template module is deactivated / when the button for the templates is not in the toolbar?

I assume that this is not an issue with the ckeditor5_template module.

BR
Daniel

🇩🇪Germany dbielke1986

I think kristiaanvandeneynde is referring to the latest Drupal 10.2 release ( https://www.drupal.org/project/drupal/releases/10.2.0 ), were the Variation cache is now part of the core.

https://www.drupal.org/project/variationcache

This feature is now available in Drupal 10.2! 🚀

Please uninstall and remove this module once you are using Drupal 10.2 or higher and have no more code mentioning the Drupal\variationcache namespace.

Hope, this is the right hint.

🇩🇪Germany dbielke1986

@diqidoq:

Latest dev does not provide any form to change the path this module reacts on

No, not a form, but the mentioned hook can be used to add this path.
If other things are needed, please open a new issue and we will take a look at it.

BR

🇩🇪Germany dbielke1986

@ressa

Thanks for reporting and creating an MR for this.
The only thing I'm unsure about is line 42 ("icon":). I imagine the line break there came from a best practice.

But @vincent.hoehn will say and evaluate that.

Thank you in any case.

🇩🇪Germany dbielke1986

The reason for this is a standard behavior of the CKEditor. If you insert the heading, you remain in the current DIV.

You can reproduce this by simply switching to a new line after inserting the first heading and continuing to write there. Here you remain in the current DIV. The following template is therefore also inserted within the first DIV.

You can solve this by adapting your templates as follows (add the "<p>&nbsp;</p>" after the template-div):

[
    {
        "title": "Heading2",
        "icon": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1. 1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z\"/></svg>",
        "description": "Insert heading2 tags for this site.",
        "html": "<div class=\"o-title__border\"><h2 class=\"o-title__xl\">Heading2</h2></div><strong><p>&nbsp;</p></strong>"
    },
    {
        "title": "Heading3",
        "icon": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1. 1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z\"/></svg>",
        "description": "Insert heading3 tags for this site.",
        "html": "<div class=\"o-title__border2\"><h3 class=\"o-title__l\">Headingr3</h3></div><strong><p>&nbsp;</p></strong>"
    } 
] 
🇩🇪Germany dbielke1986

Can confirm this behavior - we will take a look at it.
Thanks for reporting!

🇩🇪Germany dbielke1986

Still occurs with version 8.x-1.9, but the attached patch is still working.
Hoping this fix will be pushed to a next release soon.

🇩🇪Germany dbielke1986

Any ideas or update on this?

🇩🇪Germany dbielke1986

Hey,

Should be fixed in the latest dev version:

https://www.drupal.org/project/ckeditor5_template/issues/3392204 🐛 Missing schema for show_toolbar_text Fixed

🇩🇪Germany dbielke1986

Thanks for reporting this bug. We will fix this hopefully next week.

Br

Production build 0.69.0 2024