πŸ‡ΊπŸ‡ΈUnited States @liut

Account created on 20 February 2023, over 1 year ago
#

Recent comments

πŸ‡ΊπŸ‡ΈUnited States liut

patch now includes build/accordion.js file

πŸ‡ΊπŸ‡ΈUnited States liut

I realized I needed to re-build the ckeditor-accordion webpack to apply changes. This can be done using yarn or npm. You'll need to make sure to build after you make any changes to the plugins.

With that being said, I commented the lines from the code segment above in accordionediting.js and nested functionality is working for CKEditor5. I'll add a patch.

Anyone who knows more about this module feel free to edit a better solution if there is one.

πŸ‡ΊπŸ‡ΈUnited States liut

Thanks for creating this issue. Has anyone since looked into adapting this for CKEditor5?

To allow nesting accordion into accordionContent, it looks like it's being prevented by this in accordionediting.js:

    schema.addChildCheck((context, childDefinition) => {
      // Disallow accordion inside accordionContent.
      if (
        context.endsWith('accordionContent') &&
        childDefinition.name === 'accordion'
      ) {
        return false;
      }
    });

I've tried removing this and returning true but it hasn't worked for me. Also tried messing with some schema rules allowIn allowWhere allowContentOf to be able to insert accordion into accordionContent but no luck. Maybe I've got the wrong idea and I'm missing something.

πŸ‡ΊπŸ‡ΈUnited States liut

The above patch worked in removing the problem error, however I'm getting a different error preventing me from saving. I have settings "Limit allowed HTML tags and correct faulty HTML" and "Correct faulty and chopped off HTML" both unchecked. Not sure if this a problem with CKEditor5 or collapse text with this patch in particular. Any way to resolve this issue?

The current CKEditor 5 build requires the following elements and attributes:
<br> <p class> <h2 class> <h3 class> <h4 class> <h5 class> <h6 class> <cite> <dl> <dt> <dd> <span> <blockquote cite> <h1 class> <div class> <code class language-*> <pre class> <* dir ltr rtl lang> <strong> <em> <u> <s> <sub> <sup> <a href> <ul> <ol reversed start> <li> <hr> <table> <tr> <td rowspan colspan> <th rowspan colspan> <thead> <tbody> <tfoot> <caption> <img src alt height width>

The following elements are missing:
<br> <p class> <h2 class> <h3 class> <h4 class> <h5 class> <h6 class> <cite> <dl> <dt> <dd> <span> <blockquote cite> <h1 class> <div class> <code class language-*> <pre class> <* dir ltr rtl lang> <strong> <em> <u> <s> <sub> <sup> <a href> <ul> <ol reversed start> <li> <hr> <table> <tr> <td rowspan colspan> <th rowspan colspan> <thead> <tbody> <tfoot> <caption> <img src alt height width>

My manual editable tags are as follows:

<p class> <h2 class> <h3 class> <h4 class> <h5 class> <h6 class> <cite> <dl> <dt> <dd> <span> <blockquote cite> <h1 class> <div class> <code class language-*> <pre class> <* dir ltr rtl lang>

drupal v9.5.9

Production build 0.71.5 2024