Topic: No HTML5 support in htmLawed
Greetings,
All the HTML5 tags is been trapped from the posts. How do i add the HTML5 tags support? Say <video>, <audio> , controls attributes to the htmLawed.php
Thanks,
Nuthan
You are not logged in. Please login or register.
PHP Labware forum → htmLawed → No HTML5 support in htmLawed
Greetings,
All the HTML5 tags is been trapped from the posts. How do i add the HTML5 tags support? Say <video>, <audio> , controls attributes to the htmLawed.php
Thanks,
Nuthan
htmLawed doesn't have support for the new HTML5 elements like 'canvas' and 'video'. A new version with full HTML5 is almost ready and I intend to release a good beta version in 10-15 days. If there are only a few elements (3-4) you need support for, I can provide code modifications to you.
Thanks for the reply patnaik. Glad to hear the release of beta version, waiting for it. In due course, can u help me modify the code as to where only <audio> tag to be included?
Thanks,
Nuthan
To modify htmLawed for support for 'audio', and 'source' and 'track' (child elements for 'audio'), try editing the various functions within htmLawed.php as follows:
----------(1) Function htmLawed()
Modify array $e so it includes 'audio', 'source' and 'track'.
$e = array(...'audio'=>1, 'source'=>1, 'track'=>1...);
----------(2) Function hl_bal()
Modify arrays indicated below:
(a) $cE - add: 'track' and 'source' as in (1), above
(b) $cF - add: 'audio' as in (1), above
(c) $cO - add: 'audio'=>array('source'=>1, 'track'=>1)
(d) $eI - add: 'track' and 'source' as in (1), above
(e) $eO - add: 'track' and 'source' as in (1), above
----------(3) Function hl_tag()
(a) Array $eE - add: 'track' and 'source' as in (1), above
(b) $aN - This array includes keys and values like 'a1'=>array('e1'=>1, 'e2'=>1...), 'a2'=>array('e3'=>1, 'e4'=>1...)... where 'a1' and 'a2' are attribute names and 'e1', 'e2', etc., are element names that accept attributes 'a1', etc. The element 'audio' can have these attributes: 'src', 'preload', 'autoplay', 'mediagroup', 'loop', muted', 'controls'; element 'source': 'src', 'type' and 'media'; and, element 'track': 'kind', 'src', 'srclang', 'label', 'default'. Modify $aN accordingly.
PHP Labware forum → htmLawed → No HTML5 support in htmLawed