BB-Code-Button for Code-Block (Features)

by Auge, Sunday, June 21, 2009, 18:12 (5394 days ago) @ Micha

Hello Milo

I think, your solution is a bit overcomplicated. Some people would miss the PopUp (blocked or a missed new tab instead a PopUp) and you (as an user) have to click three buttons for the inclusion of a code segment.

Some ideas for simplification:

The whole code is only usable with enabled JavaScript. But in this case you can create a new box inside the document instead to open a new window. In this box the user selects only the language for the code-BB-code and that's it. The result of this behavior is the insertion of the BB-codes into the textarea with the cursor between the start and the end tag. Now the user can write or copy his/her code into the textarea.

Alternatively it should be possible to mark a bunch of text (in this case: code) and set the needed BB-codes at the start and the end of the marked text. I see that this works with your code, but it's needed to copy the code to the PopUp to select the language and to bring it back into the textarea. Most other buttons (except upload and flash (here in the testforum)) works without PopUps and I think your CodeLanguagePicker can work so too.

As a side effect the code would has a lesser size and that fact would lead to a better maintainability (IMHO).

Apart from that it is a nice enhancement, respect!

Tschö, Auge


Complete thread:

 RSS Feed of thread