You are correct in the way that you were trying to implement this in
the config file (or better yet, in an external config file that
overrides the base config file). The problem is, is that it is not
what you are looking for. I misunderstood your original post, in that
I thought that CKEditor was actually replacing your tags. That is what
the protectedSource option is for. It tells the editor not to modify
the tag itself. The issue that you are having is a formatting issue.
That is handled by CKEDITOR.dataProcessor and is apparently
configurable. If you take a look at this forum page and scroll all the
way to the bottom, the last post shows an example of how to change the
formatting rules.
(http://cksource.com/forums/viewtopic.php?f=6&t=14613&start=10#wrap)

There is also a closed trouble ticket that has some discussion
regarding the same thing. (http://dev.ckeditor.com/ticket/3260)

Here is the API page
(http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dataProcessor.html)
and the docs page
(http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Data_Processor)
for the dataProcessor.

I've never liked their documentation as there examples are always
pretty skimpy. I've never played with the dataProcessor, so
unfortunately, I don't have anything that I could share with you.

Good luck,

Dean

On Wed, Jan 11, 2012 at 12:55 PM, Torrent Girl <moniqueb...@gmail.com> wrote:
>
> How do I do this?
>
> He means the editor must be set to HTML mode in order to enter and change 
> text that contains HTML.
>
> How and where do I set the editor to html mode?
>
>
> So here is what I do:
>
> The content is saved in the DB.
>
> I open a page (editPage.cfm)
> Pull the content from the DB and display it on the page via the form.
> IF I view source,
>
> THIS
>
> <div id="contentFullNoBar">
>  <!---  ***** breadcrumbs - DO NOT EDIT  *****--->
>  <div id="breadCrumbs">
>    <cfinclude template="../includes/breadCrumbs.cfm" />
>  </div>
>  <!--- end bread crumbs --->
>
>  <div id="topHalf">
>    <div id="HalfLeftThreeQtr">
>      <div id="innerLeftThree">
>
>        <!--- **** left nav menu **** --->
>        <cfinclude template="../includes/leftNav.cfm" />
>        <!---***** end left nav ***** --->
>
>        <div id="contentHalf4">
>
>          <!--- ***** ADD MAIN CONTENT HERE ***** --->
>
>          <cfinvoke component="cfc.citi" method="getFounders"   
> returnvariable="founders" />
>          <cfinvoke component="cfc.citi" method="getDevelopers"         
> returnvariable="developers" />
>          <cfinvoke component="cfc.citi" method="getAdvisors"   
> returnvariable="advisors" />
>          <p>The CITI Program's content has been produced by a diverse team of 
> research professionals from around the world, including university-affiliated 
> administrators and faculty, independent research professionals, and 
> representatives from U.S. federal agencies. . This group of content 
> developers is dedicated to providing the highest-quality educational 
> materials for our learners, and is lead by the CITI Program Founders and the 
> CITI Program's Executive Advisory Committee.</p>
>            <cfoutput>
>          <table>
>            <tbody>
>              <tr>
>                <td><span class="bbheadingtext">CITI Program 
> Founders</span></td>
>              </tr>
>              <cfloop query="founders">
>
>                  <tr>
>                    <td>#name#</td>
>                    <td>#company#</td>
>                  </tr>
>
>              </cfloop>
>              <tr>
>                <td height="20" colspan="2">&nbsp;</td>
>              </tr>
>              <tr>
>                <td><span class="bbheadingtext">CITI Program Executive 
> Advisory Committee </span></td>
>              </tr>
>              <cfloop query="advisors">
>
>                  <tr>
>                    <td>#name#</td>
>                    <td>#company#</td>
>                  </tr>
>
>              </cfloop>
>              <tr>
>                <td height="20" colspan="2">&nbsp;</td>
>              </tr>
>              <tr>
>                <td  colspan="2">The co-founders are provided guidance and 
> advice from the CITI Executive Advisory Committee chaired by Ernest Prentice 
> Ph.D. <br />
>                  <br />
>                  The CITI Program remains dynamic and responsive to the needs 
> of our learners thanks to the efforts of the CITI Program Developer Group. 
> The Group meets periodically to review the courses, make editorial changes 
> and to develop new initiatives for the CITI Program. <br />
>                  <br /></td>
>              </tr>
>              <tr>
>                <td><span class="bbheadingtext">CITI Developers' 
> Group</span></td>
>              </tr>
>              <cfloop query="developers">
>
>                  <tr>
>                    <td>#name#</td>
>                    <td>#institution#</td>
>                  </tr>
>
>              </cfloop>
>              <tr>
>                <td height="20" colspan="2">&nbsp;</td>
>              </tr>
>            </tbody>
>          </table>
>           </cfoutput>
>          <!--- ***** END MAIN CONTENT  ***** --->
>
>        </div>
>      </div>
>    </div>
>  </div>
> </div>
> <!-- END OF MAIN CONTENT AREA-->
>
>
>
> Is changed to this:
>
> <div id="contentFullNoBar">
>        <!---  ***** breadcrumbs - DO NOT EDIT  *****--->
>        <div id="breadCrumbs">
>                <cfinclude template="../includes/breadCrumbs.cfm"> 
> </cfinclude></div>
>        <!--- end bread crumbs --->
>        <div id="topHalf">
>                <div id="HalfLeftThreeQtr">
>                        <div id="innerLeftThree">
>                                <!--- **** left nav menu **** ---><cfinclude 
> template="../includes/leftNav.cfm"> <!---***** end left nav ***** --->
>                                <div id="contentHalf4">
>                                        <!--- ***** ADD MAIN CONTENT HERE 
> ***** ---><cfinvoke component="cfc.citi" method="getFounders" 
> returnvariable="founders"> <cfinvoke component="cfc.citi" 
> method="getDevelopers" returnvariable="developers"> <cfinvoke 
> component="cfc.citi" method="getAdvisors" returnvariable="advisors">
>                                        <p>
>                                                The CITI Program&#39;s content 
> has been produced by a diverse team of research professionals from around the 
> world, including university-affiliated administrators and faculty, 
> independent research professionals, and representatives from U.S. federal 
> agencies. . This group of content developers is dedicated to providing the 
> highest-quality educational materials for our learners, and is lead by the 
> CITI Program Founders and the CITI Program&#39;s Executive Advisory 
> Committee.</p>
>                                        <cfloop query="founders"> <cfoutput> 
> </cfoutput></cfloop><cfloop query="advisors"> <cfoutput> 
> </cfoutput></cfloop><cfloop query="developers"> <cfoutput> 
> </cfoutput></cfloop>
>                                        <table>
>                                                <tbody>
>                                                        <tr>
>                                                                <td>
>                                                                        <span 
> class="bbheadingtext">CITI Program Founders</span></td>
>                                                        </tr>
>                                                        <tr>
>                                                                <td>
>                                                                        
> #name#</td>
>                                                                <td>
>                                                                        
> #company#</td>
>                                                        </tr>
>                                                        <tr>
>                                                                <td 
> colspan="2" height="20">
>                                                                        
> &nbsp;</td>
>                                                        </tr>
>                                                        <tr>
>                                                                <td>
>                                                                        <span 
> class="bbheadingtext">CITI Program Executive Advisory Committee </span></td>
>                                                        </tr>
>                                                        <tr>
>                                                                <td>
>                                                                        
> #name#</td>
>                                                                <td>
>                                                                        
> #company#</td>
>                                                        </tr>
>                                                        <tr>
>                                                                <td 
> colspan="2" height="20">
>                                                                        
> &nbsp;</td>
>                                                        </tr>
>                                                        <tr>
>                                                                <td 
> colspan="2">
>                                                                        The 
> co-founders are provided guidance and advice from the CITI Executive Advisory 
> Committee chaired by Ernest Prentice Ph.D.<br />
>                                                                        <br />
>                                                                        The 
> CITI Program remains dynamic and responsive to the needs of our learners 
> thanks to the efforts of the CITI Program Developer Group. The Group meets 
> periodically to review the courses, make editorial changes and to develop new 
> initiatives for the CITI Program.<br />
>                                                                        
> &nbsp;</td>
>                                                        </tr>
>                                                        <tr>
>                                                                <td>
>                                                                        <span 
> class="bbheadingtext">CITI Developers&#39; Group</span></td>
>                                                        </tr>
>                                                        <tr>
>                                                                <td>
>                                                                        
> #name#</td>
>                                                                <td>
>                                                                        
> #institution#</td>
>                                                        </tr>
>                                                        <tr>
>                                                                <td 
> colspan="2" height="20">
>                                                                        
> &nbsp;</td>
>                                                        </tr>
>                                                </tbody>
>                                        </table>
>                                        <!--- ***** END MAIN CONTENT  ***** 
> ---></cfinvoke></cfinvoke></cfinvoke></div>
>                                </cfinclude></div>
>                </div>
>        </div>
> </div>
> <!-- END OF MAIN CONTENT AREA-->
>
>
> As you can see everything is distorted. If I hit submit, the distorted code 
> will be saved.
>
> I have tried adding the protected tags in the config.js file like so:
>
> CKEDITOR.editorConfig = function( config ) {
>        config.protectedSource.push( /<\?[\s\S]*?\?>/g );
>        config.protectedSource.push(/[^<]*(<h1>([^<]+)<\/h1>)/g);
>        config.protectedSource.push( /<cfinclude[\s\S]*?\/cfinclude>/g);
>        config.protectedSource.push( /<cfscript[\s\S]*?\/cfscript>/g );
>        config.protectedSource.push( /<br[\s\S]*?\/>/g );   // BR Tags
>        config.protectedSource.push( /<img[\s\S]*?\/>/g );   // IMG Tags
>        config.protectedSource.push( /{exp:[\s\S]*?{\/exp:[^\}]+}/g );    // 
> Expression Engine style server side code
>        config.protectedSource.push( /{.*?}/g);
>        config.protectedSource.push( /<tex[\s\S]*?\/tex>/g);
>        config.protectedSource.push( /<object[\s|\S]+?<\/object>/g); // 
> Protects <OBJECT> tags
>        config.protectedSource.push( /<style[\s\S]*?\/style>/g); // Protects 
> <STYLE> tags
>        config.protectedSource.push( /<cfoutput[\s\S]*?\/cfoutput>/g); // 
> Protects <CFOUTPUT> tags
>        config.protectedSource.push( /<pre[\s\S]*?\/pre>/g);
>        config.protectedSource.push( /<code[\s\S]*?\/code>/g);
>        config.protectedSource.push( /<cfinclude[\s\S]*?\/cfinclude>/g);
>        config.protectedSource.push( /<cfloop[\s\S]*?\/cfloop>/g)
>        };
>
>
> But it is not working.
>
>
>
>
>
>
>
>
>
>>On Wed, 2012-01-11 at 10:03 -0500, Torrent Girl wrote:
>>
>>> When you say change it to edit mode what do you mean? Do you mean hit "View 
>>> Source"?
>>>
>>> If so that is what I am doing and where I see the code distorted.
>>
>>
>>He means the editor must be set to HTML mode in order to enter and
>>change text that contains HTML.
>>
>>When in that mode (set at the CK editor  tag itself a

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349414
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to