BUG: editor?.Css.addRules(targetCss);
Question
GrapesJS version
- I confirm to use the latest version of GrapesJS
What browser are you using?
latest version of Chrome
Reproducible demo link
null
Describe the bug
How to reproduce the bug?
editor?.Css.addRules(targetCss);
What is the expected behavior?
editor?.Css.addRules(targetCss); it add style at end <img width="826" alt="image" src="https://github.com/GrapesJS/grapesjs/assets/114127651/28425b0a-b9f7-46a8-b8bc-736aa112cc3c">
What is the current behavior?
I help editor?.Css.addRules(targetCss,{at : 0});
I want to add a style to the beginning of an array instead of the end. ...
If is necessary to execute some code in order to reproduce the bug, paste it here below:
// your code here
Code of Conduct
- I agree to follow this project's Code of Conduct
Answers (2)
This is not a bug, Css.addRules doesn't have any option argument.
You can open a discussion in regard to this topic and we can see if it makes sense to introduce it
ok, I get it,I need to add some styles in front of an array, not at the end. such as arr.unshift(css) How can I do that? I might need a little help from you
Related Questions and Answers
Continue research with similar issue discussions.
Issue #6409
BUG: Cannot drag to move components on mobile
GrapesJS version [x] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v133 Reproducible demo link https:/...
Issue #5037
FEATURE: How to drag external text into particular index inside the textable component?
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Reproducible demo link NA Describe...
Issue #5042
BUG: Every time editor.loadData(data, opts) is called, it triggers the store method defined in editor.Storage.add("api-remote", {...}), which logs the message 'api-remote store'
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? latest version of Chrome Reproducible demo...
Issue #6354
BUG: Uncaught TypeError: Cannot set properties of null (setting '_isEditor')
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Reproducible demo link https://grap...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.