- Timestamp:
- 04/10/09 10:37:08 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin/Constants.pm
r2957 r3396 4 4 5 5 use strict; 6 7 our ( %ALWAYS_BLOCK, $ALWAYS_BLOCK_S, $STARTWW, $ENDWW, $PROTOCOL );8 6 9 7 # HTML elements that are strictly block type, as defined by … … 11 9 # Block type elements do not require 12 10 # <br /> to be generated for newlines on the boundary - see WC::isInline. 13 %ALWAYS_BLOCK = map { $_ => 1 }11 our %ALWAYS_BLOCK = map { $_ => 1 } 14 12 qw( ADDRESS BLOCKQUOTE CENTER DIR DIV DL FIELDSET FORM H1 H2 H3 H4 H5 H6 15 13 HR ISINDEX MENU NOFRAMES NOSCRIPT OL P PRE TABLE UL ); 16 $ALWAYS_BLOCK_S = join( '|', keys %ALWAYS_BLOCK ); 17 18 $STARTWW = qr/^|(?<=[ \t\n\(\!])/om; 19 $ENDWW = qr/$|(?=[ \t\n\,\.\;\:\!\?\)])/om; 20 $PROTOCOL = qr/^(file|ftp|gopher|https?|irc|news|nntp|telnet|mailto):/; 21 22 our (%KNOWN_COLOUR); 23 24 # Colours with colour settings in DefaultPreferences. WTF does Foswiki see 25 # fit to *redefine* the standard colors? e.g. ORANGE below is *not* orange. 26 # For goodness sakes! 27 %KNOWN_COLOUR = ( 14 our $ALWAYS_BLOCK_S = join( '|', keys %ALWAYS_BLOCK ); 15 16 our $STARTWW = qr/^|(?<=[ \t\n\(\!])/om; 17 our $ENDWW = qr/$|(?=[ \t\n\,\.\;\:\!\?\)])/om; 18 our $PROTOCOL = qr/^(file|ftp|gopher|https?|irc|news|nntp|telnet|mailto):/; 19 20 # Colours with colour settings in DefaultPreferences. 21 our @TML_COLOURS = ( 22 'BLACK', 'MAROON', 'PURPLE', 'PINK', 'RED', 'ORANGE', 23 'YELLOW', 'LIME', 'AQUA', 'AQUAMARINE', 'GREEN', 'OLIVE', 24 'BROWN', 'NAVY', 'TEAL', 'BLUE', 'GRAY', 'SILVER', 25 'WHITE', 26 ); 27 28 # Map of possible colours back to TML %COLOUR%...%ENDCOLOR% 29 our %HTML2TML_COLOURMAP = ( 28 30 BLACK => 'BLACK', 29 31 '#000000' => 'BLACK', … … 32 34 PURPLE => 'PURPLE', 33 35 '#800080' => 'PURPLE', 34 PINK=> 'PINK',36 FUCHSIA => 'PINK', 35 37 '#FF00FF' => 'PINK', 36 38 RED => 'RED', … … 38 40 ORANGE => 'ORANGE', 39 41 '#FF6600' => 'ORANGE', 40 '#FFA500' => 'ORANGE', # HTML standard41 42 YELLOW => 'YELLOW', 42 43 '#FFFF00' => 'YELLOW', … … 52 53 BROWN => 'BROWN', 53 54 '#996633' => 'BROWN', 54 '#A52A2A' => 'BROWN', # HTML standard55 55 NAVY => 'NAVY', 56 56 '#000080' => 'NAVY',
Note: See TracChangeset
for help on using the changeset viewer.
