OSDN Git Service

b4d08562b6d35e6aca19665481552294edd3f595
[feedblog/feedgenerator.git] / wymeditor / plugins / embed / jquery.wymeditor.embed.js
1 /*
2  * WYMeditor : what you see is What You Mean web-based editor
3  * Copyright (c) 2005 - 2009 Jean-Francois Hovinne, http://www.wymeditor.org/
4  * Dual licensed under the MIT (MIT-license.txt)
5  * and GPL (GPL-license.txt) licenses.
6  *
7  * For further information visit:
8  *        http://www.wymeditor.org/
9  *
10  * File Name:
11  *        jquery.wymeditor.embed.js
12  *        Experimental embed plugin
13  *
14  * File Authors:
15  *        Jonatan Lundin
16  */
17
18 /*
19  * ISSUES:
20  * - The closing object tag seems to be stripped out...
21  */
22 (function() {
23     if (WYMeditor && WYMeditor.XhtmlValidator['_tags']['param']['attributes']) {
24         
25         WYMeditor.XhtmlValidator['_tags']["embed"] = {
26             "attributes":[
27                 "allowscriptaccess",
28                 "allowfullscreen",
29                 "height",
30                 "src",
31                 "type",
32                 "width"
33             ]
34         };
35         
36         WYMeditor.XhtmlValidator['_tags']['param']['attributes'] = {
37             '0':'name',
38             '1':'type',
39             'valuetype':/^(data|ref|object)$/,
40             '2':'valuetype',
41             '3':'value'
42         };
43         
44         var XhtmlSaxListener = WYMeditor.XhtmlSaxListener;
45         WYMeditor.XhtmlSaxListener = function () {
46             var listener = XhtmlSaxListener.call(this);
47             listener.block_tags.push('embed');
48             return listener;
49         };
50         WYMeditor.XhtmlSaxListener.prototype = XhtmlSaxListener.prototype;
51     }
52 })();