PublicLab.Editor icon indicating copy to clipboard operation
PublicLab.Editor copied to clipboard

display a "pressed" state to different formatting buttons when activated

Open keshav234156 opened this issue 5 years ago • 4 comments

Implementing the feature of the darkening of all the icons when it in use. Eg. The bold icon would be darkened when in use. Similar to the feature that is present in Google Docs. We can easily work on this feature after we have introduced woofmark in the source code of PublicLab.Editor.We can get status of whether we are using a particular module from https://github.com/bevacqua/woofmark/blob/master/src/markdown/boldOrItalic.js#L15-L35 and then can implement the feature of icon highlighting for all modules so that it becomes easy for users to know which modules are currently in use.

keshav234156 avatar May 06 '20 18:05 keshav234156

Wow this would be a great upgrade! I had almost forgotten how different our "bold" and "italics" work as compared to other types of formatting toolbars and buttons from around the internet.

ebarry avatar Jun 15 '20 20:06 ebarry

@keshav234156 have you thought about its implementation? From what I understand a function would check if a mode was started but hasn't ended. When would the function be called on input or a mouse click?

cypherean avatar Jul 29 '20 20:07 cypherean

This may be best implemented as part of Woofmark, (https://github.com/jywarren/woofmark/) upstream, as the buttons are part of that library.

jywarren avatar Oct 05 '21 18:10 jywarren

There may be two possibilities:

Either there is already CSS driving this but it's not updated to Bootstrap 4, from woofmark, OR we may need to manually flip state by monitoring the state something like this:

https://github.com/publiclab/PublicLab.Editor/blob/b1cb34626b1c3acf8a9d87f12c4ee4830d5f8471/src/adapters/PublicLab.Woofmark.js#L357-L361

jywarren avatar Oct 05 '21 18:10 jywarren