mduvall / grande.js

It's a Medium at Starbucks. Pinky ring out.
MIT License
1.3k stars 80 forks source link

Add separate toolbar class to prevent style clash #47

Closed netoneko closed 11 years ago

netoneko commented 11 years ago

The problem is that if you use editor.css as it is you are expected to have <body class="g-class"> to make a toolbar work properly because toolbar styling relates on this fact.

Now you can have something like that:

<div class="g-class">
  <article contenteditable="true"></article>
</div>

Toolbar will be appended not inside document.body but inside special <div class="g-body"> placed in the bottom of the document.body. This assures that any external CSS won't break the toolbar.

mduvall commented 11 years ago

I was thinking of adding the toolbar to the end of the any of the editor elements so there isn't too much confusion in what an element with .g-body contains. What do you think?

netoneko commented 11 years ago

Can you show me the resulting markup? I like the idea.