Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
keshav234156 opened this issue May 6, 2020 · 4 comments
Milestone

Comments

@keshav234156
Copy link
Member

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.

@ebarry
Copy link
Member

ebarry commented Jun 15, 2020

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.

@cypherean
Copy link
Contributor

@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?

@jywarren jywarren changed the title Implementing the feature of darkening of all the icons Add a "pressed" state to different formatting buttons when activated Oct 5, 2021
@jywarren jywarren changed the title Add a "pressed" state to different formatting buttons when activated display a "pressed" state to different formatting buttons when activated Oct 5, 2021
@jywarren
Copy link
Member

jywarren commented Oct 5, 2021

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

@jywarren jywarren added this to the v3.1 milestone Oct 5, 2021
@jywarren
Copy link
Member

jywarren commented Oct 5, 2021

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:

$(".wk-switchboard button").click(function() {
$(this).tooltip('hide');
$(".wk-switchboard button.woofmark-mode-markdown").toggle();
$(".wk-switchboard button.woofmark-mode-wysiwyg").toggle();
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants