AnsweredAssumed Answered

Tiny_MCE allowing iframes for Blog

Question asked by tsafarog on Feb 25, 2016
Latest reply on Feb 25, 2016 by tsafarog
Hello,

I have been struggling with this the past few days but it seems that TinyMCE keeps stripping my code

I edited both tiny_mce.js and tiny_mce-min.js to allow iframe in extended_valid_elements @ tomcat\webapps\share\modules\editors

But still my code gets stripped

I knew it wouldnt be that easy so i researched a bit more about whitelisting and found this

https://www.alfresco.com/blogs/kevinr/2012/06/19/configuring-the-share-html-processing-blackwhite-list/

so i created a

custom-slingshot-application-context.xml with the below contents


<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans-2.0.dtd'>

<beans>



   <!– Override HTML processing black and white list –>
   <bean id="webframework.webscripts.stringutils" parent="webframework.webscripts.stringutils.abstract"
         class="org.springframework.extensions.webscripts.ui.common.StringUtils">
      
      <property name="attributeBlackList">
         <set></set>
      </property>
    
       <property name="tagWhiteList">
         <set>
            <value>!DOCTYPE</value>
            <value>HTML</value>
            <value>HEAD</value>
            <value>BODY</value>
            <value>META</value>
            <value>BASE</value>
            <value>TITLE</value>
            <value>LINK</value>
            <value>CENTER</value>
            <value>EM</value>
            <value>STRONG</value>
            <value>SUP</value>
            <value>SUB</value>
            <value>P</value>
            <value>B</value>
            <value>I</value>
            <value>U</value>
            <value>BR</value>
            <value>UL</value>
            <value>OL</value>
            <value>LI</value>
            <value>H1</value>
            <value>H2</value>
            <value>H3</value>
            <value>H4</value>
            <value>H5</value>
            <value>H6</value>
            <value>SPAN</value>
            <value>DIV</value>
            <value>A</value>
            <value>IMG</value>
            <value>FONT</value>
            <value>TABLE</value>
            <value>THEAD</value>
            <value>TBODY</value>
            <value>TR</value>
            <value>TH</value>
            <value>TD</value>
            <value>HR</value>
            <value>DT</value>
            <value>DL</value>
            <value>DT</value>
            <value>PRE</value>
            <value>BLOCKQUOTE</value>
            <value>BUTTON</value>
            <value>CODE</value>
            <value>FORM</value>
            <value>OPTION</value>
            <value>SELECT</value>
            <value>TEXTAREA</value>
         <value>IFRAME</value>
         <value>EMBED</value>
         </set>
      </property>
   </bean>

</beans>



My code still gets striped

Any advice would be greatly appreciated

Kind regards

Outcomes