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

Merge Requests

Recent comments

🇩🇪Germany dbielke1986

It still seems to work that way. I still don't know why we ran into this deadlock.
After importing the tape backup and trying again, everything worked - with this very code.

Sorry for the noise...

🇩🇪Germany dbielke1986

I've also ran into this issue when trying to upgrade from v2.3 to v3.3.

🇩🇪Germany dbielke1986

Great, thank you. We will test this in our testing environment and provide feedback.

BR

🇩🇪Germany dbielke1986

When the Contrib module is activated, the module from the core is also active.

I have two questions about this:
1) Can the core module then simply be deactivated?
2) Will the configuration (content types, blocks ... ) and the created content be retained?

🇩🇪Germany dbielke1986

But idea is you can download the module and drop in and that's it. No migration or anything but would test heavily just to be sure.

That's a really great idea. Hopefully it works exactly as described.
I will report back...

Thank you very much for your work and the time you have invested here.

🇩🇪Germany dbielke1986

@vincent

Can you take a look at the MR, please?
It makes sense to me if the full path is passed at this point, as this is also checked in validate.

In *.js, only the path is taken from the input, without the Drupal.root.
Can you check again whether this is perhaps the reason why it is not always pulled directly?

But I'm not 100% sure, hence the question.

🇩🇪Germany dbielke1986

Can we get this in version 2.2.* or 2.3.*, please?
We are preparing the upgrade to D11 and need to update the group module, too.

So, next to D11 support, it will be great to have this patch also applied.

BR

🇩🇪Germany dbielke1986

@dolszewski:

Great work because now we can switch to this module, which is perfect.
The only thing I may would prefer is to move from px to em:

.cke5-custom-block-indent-1 {
  margin-left: 40px;
}

vs

.cke5-custom-block-indent-1 {
  margin-left: 2em;
}

What do you think about this?

🇩🇪Germany dbielke1986

Fixed -> Development version: 7.1.x-dev updated 8 Aug 2024 at 15:12 UTC

🇩🇪Germany dbielke1986

Thank you @radheymkumar for the fix and @Shubh02 for testing.
Will be part of the next release.

🇩🇪Germany dbielke1986

dbielke1986 made their first commit to this issue’s fork.

🇩🇪Germany dbielke1986

I would not take the absolute path to the template.json because it could be a security risk.
We should wait and take care of this issue in the core:

https://www.drupal.org/project/drupal/issues/1792310 🐛 Wrong DRUPAL_ROOT with non-standard code structure RTBC

🇩🇪Germany dbielke1986

The feature doesn't really seem to be in demand in the community.
I would now close this feature request.

If someone wants it after all, or has an MR for it, please feel free to (re)open it.

🇩🇪Germany dbielke1986

@Anas_maw

I have added your module to the module page, just like the ckeditor_templates module does.

BR
Daniel

🇩🇪Germany dbielke1986

@zterry95

I closed the MR because you need to create a MR against the 7.1.x branch, please

🇩🇪Germany dbielke1986

dbielke1986 changed the visibility of the branch 3458456-compitable-with-simpleoauth to hidden.

🇩🇪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

Production build 0.71.5 2024