Closed jamiecash closed 1 month ago
This appears to be an issue with the google fonts CSS. When this is removed, the rich text widget renders correctly.
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Inter:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800&display=swap" />
Did you find any errors in the browser console?
Did you find any errors in the browser console?
Yes. See below
Uncaught TypeError: Cannot read properties of undefined (reading 'getValue')
at get value (RichtextArea-2WHCQ2VL.js:98:31958)
at Ve.aggregateValue (django-formset.js:19:4225)
at new Ve (django-formset.js:19:2144)
at Ne.assignFieldsToForms (django-formset.js:19:35294)
at Ne.connectedCallback (django-formset.js:19:33565)
at HTMLElement.connectedCallback (django-formset.js:19:43868)
at django-formset.js:19:49437
Did you find any errors in the browser console?
Yes. See below
Uncaught TypeError: Cannot read properties of undefined (reading 'getValue') at get value (RichtextArea-2WHCQ2VL.js:98:31958) at Ve.aggregateValue (django-formset.js:19:4225) at new Ve (django-formset.js:19:2144) at Ne.assignFieldsToForms (django-formset.js:19:35294) at Ne.connectedCallback (django-formset.js:19:33565) at HTMLElement.connectedCallback (django-formset.js:19:43868) at django-formset.js:19:49437
The following warning also appears whether google fonts is included or not.
chunk-65OJRBX6.js:1 Could not traverse CSS import
CSSImportRule
DOMException: Failed to read the 'cssRules' property from 'CSSStyleSheet': Cannot access rules
at n (http://127.0.0.1:8000/static/formset/js/chunk-65OJRBX6.js:1:991)
at Object.i [as convertPseudoClasses] (http://127.0.0.1:8000/static/formset/js/chunk-65OJRBX6.js:1:407)
at http://127.0.0.1:8000/static/formset/js/django-formset.js:19:44070
```
The documentation states:
When loading CSS files from other domains such as a CDN or Google Fonts, then use
<link href="https://cdn.somedomain.xyz" crossorigin="anonymous">
. This is because django-formset parses some CSS rules, but Google Chrome refuses to do that for files from foreign origins.
did you follow these instructions?
I have a fairly simple model and have implemented the RichText functionality as follows:
The rich text dropdown for headings is displaying as a bulleted list and none of the format buttons can be clicked. The form also can't be submitted. When replacing RichText with CharField the form works as expected.
The form field renders as follows ![image](https://github.com/user-attachments/assets/47a32b77-b1c2-48c4-8284-087ceda8af5e
I have tested tht l CSS and JS files in my page are reachable
The HTML generated for the field is as follows: