Posted by Jan Krummrey on February 22, 2008 at 8:36am
| Project: | quicktags |
| Version: | master |
| Component: | User interface |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Jan Krummrey |
| Status: | needs work |
Issue Summary
Hi,
This is my first shot at giving something back to the drupal community, so bear with me and don't be too harsh. ;-)
I didn't like the way the buttons in Quicktags look (just my personal taste). So I created a few new ones.
I also had problems with mixed HTML and BBCode being inserted. So I took QuicktagsPlus as a startingpoint and created QuicktagsBBCode.module.
Please check it out and let me know what needs to be improved. Maybe there can be two Bars in the future. One for HTML (QuicktagsPlus -> maybe rename to QuicktagsHTML) and one for for BBCode.
| Attachment | Size |
|---|---|
| Bild 1.png | 6.67 KB |
| quicktagsbbcode.zip | 8.96 KB |
Comments
#1
Speaking as the guy that made the quicktagsplus buttons, they were definitely
a kludgerough, these are much better. :-)I'll attach a screenshot of the original+ quicktagsplus buttons for reference.
Is it possible you could whip up a complete set so that they all basically match?
The current status of the patch would be something like...
Base:- Bold: Completed
- Italic: Completed
- Code: Completed(Consistency aside I actually prefer the existing code button)
- Blockquote: Completed
- Link: Completed
- Teaser Break: Completed
- Image: Completed
- Close Open Tags: Completed
quicktagsplus:- H1
- H2
- H3
- Citation
- Hidden Comment
- Unordered List: Completed
- Ordered List: Completed
- List Item
- Underscore
- Deletion: Completed
- Superscript
- Subscript
I wouldn't mind hearing some feedback from others on this.
#2
I just found use of Icons under the coding standards. You might want to review that. There are some really nice icons in the Tango library. The downside is the licensing. Drupal requires GPL2 in order to host the files in CVS; the Tango Icons are Creative Commons Attribution-ShareAlike 2.5 License Agreement
We could use the tango icons as a secondary set and provide an off site place to download them or just use the Tango Icon Theme Guidelines to make GPL licensed icons to provide a consistent look.
#3
I've been working on more buttons.
H3 and H4 are done but not very pretty right now. (H1 and H2 should not appear within the node as they are already used for site-name and node-title.
As for Tango, yes, they do have many or most of the buttons. I was aiming more for tinyMCE as an inspiration. Give me some time and I'll try to make a second folder with Tango Icons.
#4
Got most of it done. (Look at screenshot). Ijust don't know how to include a new stylesheet.
function quicktagsbbcode_quicktags_alter($items) {
$path = base_path() . drupal_get_path('module','quicktagsbbcode') .'/';
//Add the complementary stylesheet for quicktagsbbcode
$stylesheet = $path .'/quicktagsbbcode.css';
drupal_add_css($stylesheet);
...
That doesn't work. Could someone help me out here?
Oh, and what is a hidden comment?
Jan
#5
The current icons look good :-)
Even though deprecated I would still like a matching H1 and H2. I understand your reason for removing them, and I should probably just consider removing them from quicktagsPlus. (Please provide any feedback about that here: #227068: Remove H1 and H2 from QuicktagsPlus) .
Don't get me wrong I really like the tinyMCE-esque buttons, actually better than the tango buttons IMHO but the Drupal coding standards mentioned Tango that's all.
Hidden comment: Poor terminology. It's just the
<!-- html comment codes -->which I use to embed some of my thinking out loud stuff that I want to hide for now but might unmask later :-)#6
As for H1 and H2, sure I'll make some icons.
Tango, well so far I've seen two big Icon contributions to Drupal.
http://www.lullabot.com/articles/free_gpl_icons_lullacons_pack_1
and
http://www.morten.dk/blog/icon-source-da-people
Tango doesn't really seem to catch on here. That's why I havent looked into it that much. It's on my ToDo though.
#7
Here's a version with 16x16 pixel Icons. A preview is .
Do you think these are too small now? The larger ones would soon flow into the second row.
ToDo:
The complementary stylesheet doesn't get loaded, so right now it has to replace the original.
Again, if anyone can give me a hand at that, that would be appreciated.
Jan
#8
Jan,
1. I do like the spacing between the different button types which help to separate them. How did you accomplish that?
2. I think the icons are almost too small at 16x16, I prefer the 22x22 they feel more comfortable to me. What happens if we want to add a few more icons later? We either let them flow into the second row (do they flow?) or we make them smaller again. Certainly any smaller is a disaster. If they flow into a second row it may be useful to intentionally do so with all of the formatting buttons in the top row (bold, italic, headings, etc) and all of the linking and embeding codes (Google, youtube, etc) in the second row.
#9
1. margins in css for the first image in the block
2. I kinda felt the same but wanted to try out the smaller size. I'll go back to 22x22.
If you make the window smaller the icons will flow into a second row. One by one though. We'd need extra divs to have them flow in blocks. So extra markup would be needed for that. So that's not for this release.
I'd do all that when my seperation of logic and presentation gets tackeled. Then we could use CSS-sprites so that we'd have to load just one image instead of all the little ones. Again something for a later release...
For now all I'd love to get in is the extra stylesheet.
Jan
#10
I was just wondering if an extra style sheet was really necessary, quicktags.css is just one simple declaration. Since bbcodes relies upon quicktags and would be using it anyway, perhaps we could just put the needed css in there (unless of course it was bbcode specific).
Current css can be seen in cvs:
http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/quicktags/q...
#11
The intention of having sub-modules was that you could change the look and behaviour of the quicktags module without affecting the original. My sub-module comes with different buttons and a different styling - the gaps betwees iconsets for example, the hovering... All that comes with the stylesheet. Including it with the submodule would be in line with the original idea of having a complete selfcontained sub-module.
That's why I want to have it.
Jan
#12
As an observer, I would like to chime in and say that I would prefer these icons as the primary icons, not a secondary sub-module. Others (including those actually doing the work) may disagree.
#13
Well actually they are two things - the icons and a BBCode formating bar. Stying with the concept of not tuching the module (core) I decided to put both into a independent module.
You're right though, you should be able to choose from the icons seperatly from the code that's being inserted. Quicktags isn't build to handle that yet. Maybe in the future it'll become the one fits all tag insertion tool for drupal.