Add a "Protect case" button in the TinyMCE toolbar
Virtual Research Environment / On-line Bibliography Manager
Brought to you by:
sirfragalot
Add a button to the TinyMCE toolbar to protect the case of a segment of text selected in the title fields of the resource editor. Without this button the user cannot discover this feature without reading the help. It's also a bit of a pain to have to type in the braces.
News: 2024/01/wikindx-v680-release-candidate-1
News: 2024/02/wikindx-v680-release-candidate-2
News: 2024/02/wikindx-v680
Good idea Stéphane. As you are the TinyMCE man, is this something you could do?
Mark
Yes. I need to find a good icon that represents the function well.
What about this one?
Maybe. Where did you find it?
I edited and added to a fatcows free icon. Here's another that's a bit clearer.
Here's what it looks like when you put it next to the others. The padlock is not drawn in the same way which makes it less clear.
Try this then.
What do you think?
I pushed in SVN a test. It's not as good as other style buttons but it is able to add and remove braces around text even if there are spaces at the ends.
This might be better.
Hard to say.
I don't know much about SVG files and have no tools to create them or convert from PNG to them.
However, here's a higher resolution PNG that, if you have the tools, might be better for converting to SVG first, then resizing.
I notice the tool will insert braces around a 0-length string (i.e., no selection, click on plugin). I'm in two minds about it. It does no harm. But it might be better to simply stop the plugin inserting braces if nothing is selected.
Mark
For resizing I use The GIMP. For concerting to SVG I use pixelied.com. The image must be 24x24 px.
I f you want to draw SVG use Inkscape.
I think the initial image is too large. When the scale change is too large, good results cannot be obtained. That's why designers draw the same icon in different sizes.
For the insertion despite the empty string I just hadn't thought of it. It's corrected.
I'll have a rethink then . . .
There are plenty of icon libraries online. I have results with "text lock" but so far I have only found paid content.
Try this then. Downloaded inkscape. Not really sure how to use it but converted anyway with pixelied.
It's better?
On this next one, you can see the padlock.
Better? I had to convert it to PNG with Inkscape and again to SVG because the size isn't right and it might not be standard SVG.
Last edit: Stéphane Aulery 2023-08-06
I think it's a lot better. Perhaps this one is better (text bolded and more space). I export as standard SVG and 24x24 according to Inkscape.
It doesn't make a big difference.
. . . and the final attempt . . .
Big difference.
Yep.
We'll stick with that last one I think.
Mark