guillaumejacquart / stupid-cms-db

Stupid CMS implementation with embedded db (nedb)
https://guillaumejacquart.github.io/stupid-cms-db/
0 stars 0 forks source link

How do I get the editor back after clicking "remove editor" in the heroku demo? #4

Closed retorquere closed 7 years ago

retorquere commented 7 years ago

After clicking "remove editor" in the heroku demo the editor dutifully disappears, but I see no way to get it back. I've re-logged-in, removed the cookies relevant to the site, hard-reloaded, but the editor doesn't come back.

guillaumejacquart commented 7 years ago

You can re-add the editor by right clicking on the html element you want to make editable. a "pencil" icon button should appear on the right side of the element. When you click on it, you will be able to edit the content again. I'll add an issue regarding the lack of user documentation.

retorquere commented 7 years ago

When I click the pencil, I get

The selector is incorrect: 0 matches. You must set the editable content manually

guillaumejacquart commented 7 years ago

This means the DOM was change with JS compared to the original HTML on the file. The CMS cannot then find the element to set as editable on the file. It can happen if the HTML template is too much dynamic. What element did you try to make editable ?

retorquere commented 7 years ago

The "DIMENSION" text. I clicked it, removed the editor, right-clicked and clicked the pencil, and then I get the error.

guillaumejacquart commented 7 years ago

All right i experienced the issue as well. I'll investigate. If we want to contribute please do I'll merge your pull request. In the meantime it seems like it's working when you reload the page after removing the editor.

guillaumejacquart commented 7 years ago

@retorquere Could you test it again ? I commited changes to the editor selection that should fix the issue.

retorquere commented 7 years ago

Yep, seems to work fine now.