[wp-hackers] class Attribute for iFrame Tag in TinyMCE
Frank Bueltge
frank at bueltge.de
Wed Sep 5 11:23:23 UTC 2012
Thanks for hint.
The values was also filtered on the tinymce-demo page; is an function
of the tinyMCE default.
But I dont find an param for allow the class attribute for this.
see an example: http://fiddle.tinymce.com/kccaab/6
Best regards and thanks a lot for the time
Frank
On Wed, Sep 5, 2012 at 12:42 PM, Almog Baku <almog.baku at gmail.com> wrote:
> You should check first who block it. If it the js wysiwyg engine or the php
> parser..
> Also, give it a try within the tinymce official demo(by their website).
>
> בתאריך יום רביעי, 5 בספטמבר 2012, Frank Bueltge כתב:
>
>> Hello at all.
>> I have allowed the iframe tag for the editor via follow source, see
>> below. But the class attribute is in the current stable and nightly
>> build not possible, always was killed.
>> Maybe is this an bug or an feature? Give it an filter for deactivate
>> the functinos, that remove all class attributes after an switch from
>> html to visual mode.
>> Thanks for your time and help!
>>
>> add_filter( 'tiny_mce_before_init', 'fb_change_mce_options' );
>> function fb_change_mce_options( $arr ) {
>>
>> // Comma separated string od extendes tags
>> // Command separated string of extended elements
>> $ext =
>> 'iframe[id|class|title|style|align|frameborder|height|longdesc|marginheight|marginwidth|name|scrolling|src|width]';
>>
>> if ( isset( $arr['extended_valid_elements'] ) )
>> $arr['extended_valid_elements'] .= ',' . $ext;
>> else
>> $arr['extended_valid_elements'] = $ext;
>>
>> var_dump( $GLOBALS['allowedposttags'] );
>>
>> var_dump($arr);
>>
>> return $arr;
>> }
>>
>> i have check the allowedposttags var. This var don't have the new tag
>> iframe after my additional. But also an enhancement of this var have
>> no results for the class attribute. With other attributes works fine,
>> like frameborder.
>>
>> $GLOBALS['allowedposttags']['iframe'] = array(
>> "id" => TRUE,
>> "class" => array(),
>> "title" => TRUE,
>> "style" => TRUE,
>> "align" => TRUE,
>> "frameborder" => TRUE,
>> "longdesc" => TRUE,
>> "marginheight" => TRUE,
>> "marginwidth" => TRUE,
>> "name" => TRUE,
>> "scrolling" => TRUE,
>> "src" => TRUE,
>> "height" => TRUE,
>> "width" => TRUE
>> );
>>
>> Best regards
>> frank
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com <javascript:;>
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
More information about the wp-hackers
mailing list