Interestingly, I just tried to implement that in my new OS (ArchLabs) and it doesnt seem to be working for me now
I hope I havent done something daft, ........ again!
My userchrome.css:
/* For styling the entire Joplin app (except the rendered Markdown, which is defined in `userstyle.css`) */
div.editor-toolbar div button {
/* removes the WYSIWYG button */
display: none !important;
}
That seems really odd. It definitely works normally. Maybe inspect the element with the dev tools and see if the CSS is being overruled by anything?
Or take a screenshot of the editor and compare it to after you add the CSS to see if somehow you are targeting some other element. I doubt it but it is always possible.
So out of curiosity (as I've not heard of it before) I installed a VM of archlabs with dwm and installed the same AUR package as you, added the CSS and it works just fine.
I would check the following:
Double check you are editing the right file in the right place - open the profile dir from Joplin (Help > Open profile directory) and check the userchrome in there is the same one as is being opened from Options > Appearance > Custom stylesheet for Joplin-wide app styles. It should be in ~/.config/joplin-desktop.
Open Joplin and go Help > Toggle development tools.
See this thread I posted before for a better description but basically press the little "arrow in a box" icon in the top left of the dev tools and click the editor button you are trying to remove.
You should see something like this:
In the elements section.
In the styles section at the bottom you can see the actual styles being applied - as I can't emulate yours exactly I applied a red border to my button which is being overwritten (as shown by the strikethrough) but you can still see that the CSS was valid and it would apply it if it wasn't being overruled.
Check to see if you have anything like that in there for the same selector but with display: none.
So,
I have i3 set up on TTY2 so I thought I'd try there
I put the code for hiding the toggle editor button in my userchrome.css and started Joplin in i3
The button was still there
But when I clicked on it it dissapeared!
I shut down Joplin and reopened it in Openbox on TTY1 and no button
shutdown and restarted Joplin
the bloody button is back
Yeah, I just looked at a previous post and realised something, I never even considered anyone trying to remove the button to stay inside the richtext editor - it is virtually always people wanting to disable it. I only just spotted the elements in the dev tool html you posted.
No matter what I try I cant replicate what happened before in i3
but it did disappear!
I dont want to use the WYSIWYG editor - I dont want to accidently go into it - hence removing the button
I may have wanted the WYWIWYG editor in the past tho - cant remember what I had for breakfast even )
The first CSS (div.editor-toolbar div button) selector I think only works within the markdown editor, the one I just posted works in the richtext editor as it has a different toolbar. The pic you posted before has a joplin-tinymce div which must mean you had the richtext editor on.
It also explains why clicking it when you saw it made it vanish, it doesn't exist on the editor you swapped to - the CSS was removing it.