source: companies/serpro/expressoMail1_2/js/fckeditor/editor/_source/internals/fckregexlib.js @ 903

Revision 903, 3.2 KB checked in by niltonneto, 15 years ago (diff)

Importacao inicial do Expresso do Serpro

Line 
1/*
2 * FCKeditor - The text editor for internet
3 * Copyright (C) 2003-2006 Frederico Caldeira Knabben
4 *
5 * Licensed under the terms of the GNU Lesser General Public License:
6 *              http://www.opensource.org/licenses/lgpl-license.php
7 *
8 * For further information visit:
9 *              http://www.fckeditor.net/
10 *
11 * "Support Open Source software. What about a donation today?"
12 *
13 * File Name: fckregexlib.js
14 *      These are some Regular Expresions used by the editor.
15 *
16 * File Authors:
17 *              Frederico Caldeira Knabben (fredck@fckeditor.net)
18 */
19
20var FCKRegexLib = {
21
22// This is the Regular expression used by the SetHTML method for the "'" entity.
23AposEntity              : /'/gi ,
24
25// Used by the Styles combo to identify styles that can't be applied to text.
26ObjectElements  : /^(?:IMG|TABLE|TR|TD|TH|INPUT|SELECT|TEXTAREA|HR|OBJECT|A|UL|OL|LI)$/i ,
27
28BlockElements   : /^(?:P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|TD|TH)$/i ,
29
30// Elements marked as empty "Empty" in the XHTML DTD.
31EmptyElements   : /^(?:BASE|META|LINK|HR|BR|PARAM|IMG|AREA|INPUT)$/i ,
32
33// List all named commands (commands that can be interpreted by the browser "execCommand" method.
34NamedCommands   : /^(?:Cut|Copy|Paste|Print|SelectAll|RemoveFormat|Unlink|Undo|Redo|Bold|Italic|Underline|StrikeThrough|Subscript|Superscript|JustifyLeft|JustifyCenter|JustifyRight|JustifyFull|Outdent|Indent|InsertOrderedList|InsertUnorderedList|InsertHorizontalRule)$/i ,
35
36BodyContents    : /([\s\S]*\<body[^\>]*\>)([\s\S]*)(\<\/body\>[\s\S]*)/i ,
37
38// Temporary text used to solve some browser specific limitations.
39ToReplace               : /___fcktoreplace:([\w]+)/ig ,
40
41// Get the META http-equiv attribute from the tag.
42MetaHttpEquiv   : /http-equiv\s*=\s*["']?([^"' ]+)/i ,
43
44HasBaseTag              : /<base /i ,
45
46HtmlOpener              : /<html\s?[^>]*>/i ,
47HeadOpener              : /<head\s?[^>]*>/i ,
48HeadCloser              : /<\/head\s*>/i ,
49
50TableBorderClass : /\s*FCK__ShowTableBorders\s*/ ,
51
52// Validate element names.
53ElementName             : /(^[A-Za-z_:][\w.\-:]*\w$)|(^[A-Za-z_]$)/ ,
54
55// Used in conjuction with the FCKConfig.ForceSimpleAmpersand configuration option.
56ForceSimpleAmpersand : /___FCKAmp___/g ,
57
58// Get the closing parts of the tags with no closing tags, like <br/>... gets the "/>" part.
59SpaceNoClose    : /\/>/g ,
60
61EmptyParagraph  : /^<(p|div)>\s*<\/\1>$/i ,
62
63TagBody                 : /></ ,
64
65StrongOpener    : /<STRONG([ \>])/gi ,
66StrongCloser    : /<\/STRONG>/gi ,
67EmOpener                : /<EM([ \>])/gi ,
68EmCloser                : /<\/EM>/gi ,
69AbbrOpener              : /<ABBR([ \>])/gi ,
70AbbrCloser              : /<\/ABBR>/gi ,
71
72GeckoEntitiesMarker : /#\?-\:/g ,
73
74// We look for the "src" and href attribute with the " or ' or whithout one of
75// them. We have to do all in one, otherwhise we will have problems with URLs
76// like "thumbnail.php?src=someimage.jpg" (SF-BUG 1554141).
77ProtectUrlsImg  : /(?:(<img(?=\s).*?\ssrc=)("|')(.*?)\2)|(?:(<img\s.*?src=)([^"'][^ >]+))/gi ,
78ProtectUrlsA    : /(?:(<a(?=\s).*?\shref=)("|')(.*?)\2)|(?:(<a\s.*?href=)([^"'][^ >]+))/gi ,
79
80Html4DocType    : /HTML 4\.0 Transitional/i ,
81DocTypeTag              : /<!DOCTYPE[^>]*>/i ,
82
83// These regex are used to save the original event attributes in the HTML.
84TagsWithEvent   : /<[^\>]+ on\w+[\s\r\n]*=[\s\r\n]*?('|")[\s\S]+?\>/g ,
85EventAttributes : /\s(on\w+)[\s\r\n]*=[\s\r\n]*?('|")([\s\S]*?)\2/g,
86ProtectedEvents : /\s\w+_fckprotectedatt="([^"]+)"/g
87}
Note: See TracBrowser for help on using the repository browser.