Typography sector not found
Hi @tasham16 ! I think this is expected behaviour because modules are loaded after plugins in the editor's initialization sequence, & sectors are only added to the StyleManager module right after it has been loaded. I don't know if this is a very clean way of achieving it, but without a better solution you could try o...
Read full answer below ↓Question
When using trying to add a font to the style manager, I use the following code: const prop = editor.StyleManager.getProperty('typography', 'font-family'); prop.set('options', [ {value: "'Oswald', sans-serif", name: 'Oswald'}, ... ]); However, when I use this inside a plugin (in the index.js) I am creating, I call it with editor.on('load',....) I keep getting 'typography' sector not found. However if I call it outside of the plugin (in the index.html) in the same way, where I am initializing the editor with all the configs, it works. So I was wondering, can we not add new fronts in a plugin so...
Answers (3)
Hi @tasham16 ! I think this is expected behaviour because modules are loaded after plugins in the editor's initialization sequence, & sectors are only added to the StyleManager module right after it has been loaded. I don't know if this is a very clean way of achieving it, but without a better solu...
Thank you so much! I will try that out!
The right way is to wait for the load of the editor
editor.on('load' => {
const prop = editor.StyleManager...
})
Related Questions and Answers
Continue research with similar issue discussions.
Issue #2823
i have used this method to load fonts , working fine in chrome but showing original fonts list in safari
editor.on('load', function () { styleManager = editor.StyleManager; fontProperty = styleManager.getProperty('Typography', 'font-family'); v...
Issue #2458
[Question] Setting of default value for css property in StyleManager config does not affect style of new added block?
I have a question. When css property is added to StyleManager configuration, for example I added color and set defaults to green (just for...
Issue #2586
[Question]: How update style manager panel using few devices and custom css class
There is a custom class added to simple grapesjs project: If there is no devices and user adds the class into the selectors field Settings...
Issue #3294
FEAT: Adding options to properties list array in style manager
Hi, How can I add buildProps to properties list such that when an option is selected, the properties of that option will be displayed An ex...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins →Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.
Browse premium plugins →Related tutorials
In-depth guides on the same topic.
Tutorial
How to Build a Production GrapesJS Editor: The Complete Walkthrough of Brief, Preset, Plugins, and Services
A complete walkthrough of building a production GrapesJS editor: how to choose a preset, pick plugins, and scope setup services without burning a sprint.
Tutorial
Embed GrapesJS in Your SaaS: A Weekend Guide
Embed GrapesJS in your SaaS and ship a white-label page builder over a weekend. Honest tradeoffs, real code, and the plugins that close the UX gap.
Tutorial
Find the Right GrapesJS Plugin in Seconds: Smarter Discovery Is Live
We're shipping a set of discovery upgrades. New label filters, a proper compatibility switch for GrapesJS vs Studio, one-click and a smarter sort bar.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.