Support custom type attribute in scriptLoader method with new parameter #5434
Labels
core
The issue is caused by the editor core code.
status:confirmed
An issue confirmed by the development team.
type:feature
A feature request.
Type of report
Feature request
Provide description of the new feature
In the Drupal application, the type attribute is sometimes used to specify the module scope. The script tag that is desired looks like
<script src="/path/to/file" type="module"></script>
. Currently the CKEDITOR.scriptLoader method adds the default type of 'text/javascript'.I propose we add another parameter to the scriptLoader method of type string that will render as the value of the type attribute in the script tag that is generated. We can set the type attribute parameter to be a default of 'text/javascript' so backwards compatibility is maintained. With this new feature, we will be able to set the parameter as 'module' when using scriptLoader to set the type attribute in the script tag.
The text was updated successfully, but these errors were encountered: