Issue #812💬 AnsweredOpened January 28, 2018by kevinalvarez0 reactions

Layers Manager doesn't work with several editors

快速解答by artf

Thanks Kevin, I've found the issue and the fix will be available in the next release

Read full answer below ↓

Question

Hi again! As I comment in a previous question, We're working with several editors in the same window. The issue we're facing now is that layer manager doesn't work fine when I go from one editor to another. These are the steps that make this problem happens:

  1. Editors initiated
  2. Go to Layer Manager inside editor 1 (click on layers icon) - everything ok

layergrapes1

  1. Open editor 2 and click on layers icon - looks like this: layergrapes2

I saw that the library is adding the prefix "gjs-" on components that already have this prefix: layergrapes3

To fix it provisionaly, I changed this line inside javascript code "config.layers.stylePrefix = config.stylePrefix + lyStylePfx;" to "if (lyStylePfx.substring(0,4) != "gjs-") config.layers.stylePrefix = config.stylePrefix + lyStylePfx;". With this now it's working fine, but there may be a better solution.

Please, let me know if there is another way. Thanks!

Answers (2)

artfJanuary 29, 2018

Thanks Kevin, I've found the issue and the fix will be available in the next release

lock[bot]September 18, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

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.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.