ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
Edit.php
Go to the documentation of this file.
1
<?
php
2
7
class
HTMLPurifier_HTMLModule_Edit
extends
HTMLPurifier_HTMLModule
8
{
9
13
public
$name
=
'Edit'
;
14
18
public
function
setup
(
$config
)
19
{
20
$contents =
'Chameleon: #PCDATA | Inline ! #PCDATA | Flow'
;
21
$attr = array(
22
'cite'
=>
'URI'
,
23
// 'datetime' => 'Datetime', // not implemented
24
);
25
$this->
addElement
(
'del'
,
'Inline'
, $contents,
'Common'
, $attr);
26
$this->
addElement
(
'ins'
,
'Inline'
, $contents,
'Common'
, $attr);
27
}
28
29
// HTML 4.01 specifies that ins/del must not contain block
30
// elements when used in an inline context, chameleon is
31
// a complicated workaround to acheive this effect
32
33
// Inline context ! Block context (exclamation mark is
34
// separator, see getChildDef for parsing)
35
39
public
$defines_child_def
=
true
;
40
45
public
function
getChildDef
(
$def
)
46
{
47
if
(
$def
->content_model_type !=
'chameleon'
) {
48
return
false
;
49
}
50
$value = explode(
'!'
,
$def
->content_model);
51
return
new
HTMLPurifier_ChildDef_Chameleon
($value[0], $value[1]);
52
}
53
}
54
55
// vim: et sw=4 sts=4
HTMLPurifier_HTMLModule_Edit\$defines_child_def
$defines_child_def
bool
Definition:
Edit.php:39
$config
$config
Definition:
bootstrap.php:15
HTMLPurifier_HTMLModule_Edit\getChildDef
getChildDef($def)
Definition:
Edit.php:45
HTMLPurifier_HTMLModule_Edit
XHTML 1.1 Edit Module, defines editing-related elements.
Definition:
Edit.php:7
HTMLPurifier_ChildDef_Chameleon
Definition that uses different definitions depending on context.
Definition:
Chameleon.php:12
HTMLPurifier_HTMLModule_Edit\$name
$name
string
Definition:
Edit.php:13
HTMLPurifier_HTMLModule\addElement
addElement($element, $type, $contents, $attr_includes=array(), $attr=array())
Convenience function that sets up a new element.
Definition:
HTMLModule.php:144
HTMLPurifier_HTMLModule_Edit\setup
setup($config)
Definition:
Edit.php:18
HTMLPurifier_HTMLModule
Represents an XHTML 1.1 module, with information on elements, tags and attributes.
Definition:
HTMLModule.php:18
$def
$def
Definition:
croninfo.php:21
php
libs
composer
vendor
ezyang
htmlpurifier
library
HTMLPurifier
HTMLModule
Edit.php
Generated on Thu Jan 16 2025 19:01:39 for ILIAS by
1.8.13 (using
Doxyfile
)