It would be nice to be able to edit color codes, bold, reverse, underline, etc. of real name in webadmin
##
<bountysource-plugin>
---
There is a **[$5 open bounty](https://www.bountysource.com/issues/672-webadmin-control-codes-realname-editor?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github)** on this issue. Add to the bounty at [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github).
</bountysource-plugin>
<!-- github-sync-id:3912637 -->
Here are some of my ideas for this:
To make this user friendly i would suggest adding an jquery wysiwyg editor with a very minimal function set.
After entering text (and marking the text or a text-segment), the user might then click on editor icons
to apply the control codes to the marked text.
This component would also be of good (re)use in the web-chat.
We might discuss on how to open the editor?
Editor is not opened. It's always present above or under the input field.
Editor opens, when clicking in the input field?
Editor opens, when clicking on an icon next to the input field?
I would favor a unobtrusive implementation,
maybe by just adding a css class like "control-codes-editor" to the input field.
This would be the only modification on template side and the rest would be javascript stuff.
If javascript is enabled on client-side, then the elements containing this class get selected
and an event (load editor) is bound to them.
If javascript is disabled, the user is still able to enter codes manually (well, if he knows the control codes..).
The editor would have these 5 text-buttons (or icons)
foreground color (color popup)
background color (color popup)
bold
reverse
underline
Color Codes are not defined in the RFC, right?
Do you agree on using the following color values (used in the mIRC Color popup)?
0 white 8 yellow
1 black 9 lightgreen
2 blue 10 cyan
3 green 11 lightcyan
4 lightred 12 lightblue
5 brown 13 pink
6 purple 14 grey
7 orange 15 lightgrey
What are the control codes for bold, reverse and underline?
The general control code is ASCII char 3, right?
Is the control needed at the start and the beginning of the marked text,
like ^CFG,BGTEXT^C = ^C4,0red text on black background^C ?
my 2 cent for now.
Here are some of my ideas for this:
To make this user friendly i would suggest adding an jquery wysiwyg editor with a very minimal function set.
After entering text (and marking the text or a text-segment), the user might then click on editor icons
to apply the control codes to the marked text.
This component would also be of good (re)use in the web-chat.
We might discuss on how to open the editor?
- Editor is not opened. It's always present above or under the input field.
- Editor opens, when clicking in the input field?
- Editor opens, when clicking on an icon next to the input field?
I would favor a unobtrusive implementation,
maybe by just adding a css class like "control-codes-editor" to the input field.
This would be the only modification on template side and the rest would be javascript stuff.
If javascript is enabled on client-side, then the elements containing this class get selected
and an event (load editor) is bound to them.
If javascript is disabled, the user is still able to enter codes manually (well, if he knows the control codes..).
The editor would have these 5 text-buttons (or icons)
1) foreground color (color popup)
2) background color (color popup)
3) bold
4) reverse
5) underline
Color Codes are not defined in the RFC, right?
Do you agree on using the following color values (used in the mIRC Color popup)?
0 white 8 yellow
1 black 9 lightgreen
2 blue 10 cyan
3 green 11 lightcyan
4 lightred 12 lightblue
5 brown 13 pink
6 purple 14 grey
7 orange 15 lightgrey
What are the control codes for bold, reverse and underline?
The general control code is ASCII char 3, right?
Is the control needed at the start and the beginning of the marked text,
like ^CFG,BGTEXT^C = ^C4,0red text on black background^C ?
my 2 cent for now.
<!-- github-comment-id:5187670 -->
maybe by just adding a css class like "control-codes-editor" to the input field.
Using a class for that would be nice, yes...
If javascript is disabled, the user is still able to enter codes manually (well, if he knows the control codes..).
If javascript is disabled, a help may be presented near the box with the control codes...
Perhaps it would be better to use some readable characters here instead of raw ASCII codes, because there's no good way to type that mess into a text field in web browser. Like {color} instead of ^C and {bold} instead of ^B, for example. It's not hard to change them in both directions on server side.
foreground color (color popup)
background color (color popup)
You can't set background color without setting foreground color. It's either "foreground only" (^C12), or "foreground and background" (^C12,13)
What are the control codes for bold, reverse and underline?
$chr(1) Client-to-Client Protocol
$chr(2) Ctrl+b Bold text
$chr(3) Ctrl+k Colour text
$chr(15) Ctrl+o Normal text
$chr(22) Ctrl+r Reversed text
$chr(31) Ctrl+u Underlined text
(numbers are in decimal here) http://www.mirc.net/ascii.php
Is the control needed at the start and the beginning of the marked text, like ^CFG,BGTEXT^C = ^C4,0red text on black background^C ?
It's at the beginning of the marked text, yes. Ending ^C may be missing. It's usually missing, actually.
But it's more parseable for clients, if to use 2 digits always, so ^C04,00text for red text on black background. Otherwise you can't make colored digits, as they will be parsed as a part of the color
> maybe by just adding a css class like "control-codes-editor" to the input field.
Using a class for that would be nice, yes...
> If javascript is disabled, the user is still able to enter codes manually (well, if he knows the control codes..).
If javascript is disabled, a help may be presented near the box with the control codes...
Perhaps it would be better to use some readable characters here instead of raw ASCII codes, because there's no good way to type that mess into a text field in web browser. Like {color} instead of ^C and {bold} instead of ^B, for example. It's not hard to change them in both directions on server side.
> 1) foreground color (color popup)
> 2) background color (color popup)
You can't set background color without setting foreground color. It's either "foreground only" (^C12), or "foreground and background" (^C12,13)
> Color Codes are not defined in the RFC, right?
Colors are kinda defined at http://www.mirc.com/colors.html
> What are the control codes for bold, reverse and underline?
$chr(1) Client-to-Client Protocol
$chr(2) Ctrl+b Bold text
$chr(3) Ctrl+k Colour text
$chr(15) Ctrl+o Normal text
$chr(22) Ctrl+r Reversed text
$chr(31) Ctrl+u Underlined text
(numbers are in decimal here)
http://www.mirc.net/ascii.php
> Is the control needed at the start and the beginning of the marked text, like ^CFG,BGTEXT^C = ^C4,0red text on black background^C ?
It's at the beginning of the marked text, yes. Ending ^C may be missing. It's usually missing, actually.
But it's more parseable for clients, if to use 2 digits always, so ^C04,00text for red text on black background. Otherwise you can't make colored digits, as they will be parsed as a part of the color
<!-- github-comment-id:5191435 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
It would be nice to be able to edit color codes, bold, reverse, underline, etc. of real name in webadmin
--- There is a **[$5 open bounty](https://www.bountysource.com/issues/672-webadmin-control-codes-realname-editor?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github)** on this issue. Add to the bounty at [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github).The same about quit message
Here are some of my ideas for this:
To make this user friendly i would suggest adding an jquery wysiwyg editor with a very minimal function set.
After entering text (and marking the text or a text-segment), the user might then click on editor icons
to apply the control codes to the marked text.
This component would also be of good (re)use in the web-chat.
We might discuss on how to open the editor?
I would favor a unobtrusive implementation,
maybe by just adding a css class like "control-codes-editor" to the input field.
This would be the only modification on template side and the rest would be javascript stuff.
If javascript is enabled on client-side, then the elements containing this class get selected
and an event (load editor) is bound to them.
If javascript is disabled, the user is still able to enter codes manually (well, if he knows the control codes..).
The editor would have these 5 text-buttons (or icons)
Color Codes are not defined in the RFC, right?
Do you agree on using the following color values (used in the mIRC Color popup)?
0 white 8 yellow
1 black 9 lightgreen
2 blue 10 cyan
3 green 11 lightcyan
4 lightred 12 lightblue
5 brown 13 pink
6 purple 14 grey
7 orange 15 lightgrey
What are the control codes for bold, reverse and underline?
The general control code is ASCII char 3, right?
Is the control needed at the start and the beginning of the marked text,
like ^CFG,BGTEXT^C = ^C4,0red text on black background^C ?
my 2 cent for now.
Using a class for that would be nice, yes...
If javascript is disabled, a help may be presented near the box with the control codes...
Perhaps it would be better to use some readable characters here instead of raw ASCII codes, because there's no good way to type that mess into a text field in web browser. Like {color} instead of ^C and {bold} instead of ^B, for example. It's not hard to change them in both directions on server side.
You can't set background color without setting foreground color. It's either "foreground only" (^C12), or "foreground and background" (^C12,13)
Colors are kinda defined at http://www.mirc.com/colors.html
$chr(1) Client-to-Client Protocol
$chr(2) Ctrl+b Bold text
$chr(3) Ctrl+k Colour text
$chr(15) Ctrl+o Normal text
$chr(22) Ctrl+r Reversed text
$chr(31) Ctrl+u Underlined text
(numbers are in decimal here)
http://www.mirc.net/ascii.php
It's at the beginning of the marked text, yes. Ending ^C may be missing. It's usually missing, actually.
But it's more parseable for clients, if to use 2 digits always, so ^C04,00text for red text on black background. Otherwise you can't make colored digits, as they will be parsed as a part of the color