bevacqua / woofmark

:dog2: Barking up the DOM tree. A modular, progressive, and beautiful Markdown and HTML editor
https://bevacqua.github.io/woofmark
MIT License
1.62k stars 74 forks source link

Toolbar button state and toggling modes. #14

Closed iliaznk closed 8 years ago

iliaznk commented 8 years ago

Great work, first of all! But got a couple of questions.

  1. Is it possible to have buttons reflect current state of a selection/cursor position? For example, if a bold text is selected or the cursor is within a bold text, then we can style the bold button as active.
  2. Is it possible to have formatting buttons toggle their state? For example, when in WSIWYG mode you click the bold button (or press the cmd+B shortcut) you get bold text, but you can't toggle it off by pressing the button or the shortcut for the second time.
iliaznk commented 8 years ago

Maybe I was wrong or maybe you've done some corrections already, but now I see that toggling is working, but when you press the button (or shortcut) for the second time you still get a placeholder like 'bold text' for example, which may be a bit confusing for an end user.

bevacqua commented 8 years ago

Feel free to implement something like this but I won't be doing it any time soon. Closing for now