You may request notification for FCKeditor: Viewing Source alters Headings and htags. |
1:
FCKeditor: Viewing Source alters Headings and htags
By: katey 1
|
01/15/11 07:56 PM | |||
I'm trying to create new Headings in the Format Combo box, however i am encountering major problems when viewing the source.
I'm running LAMS version 2.3 (within Moodle) integrated with FCKeditor ver2.6.4 I have followed the instructions listed in http://community.contractwebdevelopment.com/changing-fckeditor-font-format-list and updated the files below as specified. I now have more Headings listed in the Format box (Heading 7,8,9,10) however i have two major issues. 1.) when i apply a newly created heading to a word in the editor -i can see the attributed css applied to the word, but then if i click Source, then click it again (to get back to the editor) it strips the htags and applies random htags. see below Apply Heading 8 = looks like Heading 8 css First time click Source = Click Source again - removes look of Heading 8 and reverts to previous style If i continue to do this, Source continues to change <h8> </h8> 2.)The Headings listed in the Format box don't reflect their css styles - even though i have updated the Any advice or help would be greatly appreciated! The files i changed are as follows: root/fckstyles.xml - Added Headings 7-10 to Style Names B={input:1,button:1,select:1,textarea:1,label:1};C=X({a:1},B);D=X({iframe:1},C);E={hr:1,ul:1,menu:1,div:1,blockquote:1,noscript:1,table:1,center:1,address:1,dir:1,pre:1,h5:1,dl:1,h4:1,h7:1,h8:1,h9:1,h10:1,noframes:1,h6:1,ol:1,h1:1,h3:1,h2:1}; FCK.DTD=(function(){var X=FCKTools.Merge;var A,L,J,M,N,O,D,H,P,K,Q,F,G,C,B,E,I;A={isindex:1,fieldset:1};B={input:1,button:1,select:1,textarea:1,label:1};C=X({a:1},B);D=X({iframe:1},C);E={hr:1,ul:1,menu:1,div:1,blockquote:1,noscript:1,table:1,center:1,address:1,dir:1,pre:1,h5:1,dl:1,h4:1,h7:1,h8:1,h9:1,h10:1,noframes:1,h6:1,ol:1,h1:1,h3:1,h2:1} A.BlocksOpener=/\<(P|DIV|H1|H2|H3|H4|H5|H6|H7|H8|H9|H10|ADDRESS|PRE|OL|UL|LI|DL|DT|DD|TITLE|META|LINK|BASE|SCRIPT|LINK|TD|TH|AREA|OPTION)[^\>]*\>/gi;A.BlocksCloser=/\<\/(P|DIV|H1|H2|H3|H4|H5|H6|H7|H8|H9|H10|ADDRESS|PRE|OL|UL|LI|DL|DT|DD|TITLE|META|LINK|BASE|SCRIPT|LINK|TD|TH|AREA|OPTION)[^\>]*\>/gi; basefont:{},h5:L,h4:L,h7:L,h8:L,h9:L,h10:L,samp:L,h6:L,ol:Q,h1:L,h3:L,option:N,h2:L,form:X FCK.DTD=(function(){var X=FCKTools.Merge;var A,L,J,M,N,O,D,H,P,K,Q,F,G,C,B,E,I;A={isindex:1,fieldset:1};B={input:1,button:1,select:1,textarea:1,label:1};C=X({a:1},B);D=X({iframe:1},C);E={hr:1,ul:1,menu:1,div:1,blockquote:1,noscript:1,table:1,center:1,address:1,dir:1,pre:1,h5:1,dl:1,h4:1,h7:1,h8:1,h9:1,h10:1,noframes:1,h6:1,ol:1,h1:1,h3:1,h2:1};F={ins:1,del:1,script:1};G=X({b:1,acronym:1,bdo:1,'var':1,'#':1,abbr:1,code:1,br:1,i:1,cite:1,kbd:1,u:1,strike:1,s:1,tt:1,strong:1,q:1,samp:1,em:1,dfn:1,span:1},F);H=X({sub:1,img:1,object:1,sup:1,basefont:1,map:1,applet:1,font:1,big:1,small:1},G);I=X({p:1},H);J=X({iframe:1},H,B);K={img:1,noscript:1,br:1,kbd:1,center:1,button:1,basefont:1,h5:1,h4:1,h7:1,h8:1,h9:1,h10:1,samp:1,h6:1,ol:1,h1:1,h3:1,h2:1,form:1,font:1,'#':1, var C={p:B[0],pre:B[1],address:B[2],h1:B[3],h2:B[4],h3:B[5],h4:B[6],h5:B[7],h6:B[8],h7:B[9],h8:B[10],h9:B[11],h10:B[12],div:B[13]||(B[0]+' (DIV)')}; FontFormats : "Normal;Formatted;Address;Heading 1;Heading 2;Heading 3;Heading 4;Heading 5;Heading 6;Heading 7;Heading 8;Heading 9;Heading10;Normal (DIV)", root/fckconfig.js: else alert("The FCKConfig.CoreStyles['"+E+"'] setting was not found. Please check the fckconfig.js file"); Posted by katey 1 |
Reply to first post on this page
Back to LAMS for Tech-Heads - General Forum