Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2009-09-29 23:29:52

calebmei
New member
Registered: 2009-08-24
Posts: 7

xinha_config support both fullPage and pageStyleSheets

Hi there,

Has any one enable both of these settings at the same time?
    fullPage = true;
and
    pageStyleSheets = [ "/my/external.css" ];

and got it working?

My finding is that once I enable fullPage = true, xinha won't pick up the style sheet.

So what I am trying to do is to go thru the code where fullPage is defined, and hardcode, to support both full page and pageStyleSheets

There are 7 locations in XinhaCore.js that points to fullPage, and I change them accordingly but haven't got it working.

Questions:
1. Any suggestion on how to get both fullPage and pageStyleSheets to work?
2. Any suggestion on how to reformat xinhaCore.js so that I can easily update? Reformat in eclipse is not working, and any text editor was having a tough time edit the file.
3. Anywhere else I should look to change?

Thanks in advance and really appreciate any assistance. smile

Cheers,
Calebmei

Offline

#2 2009-09-30 01:58:29

calebmei
New member
Registered: 2009-08-24
Posts: 7

Re: xinha_config support both fullPage and pageStyleSheets

Finished the customization:

1. Download xinhaCore.js from SVN
2. Copy this section of code to where fullPage = false
if ( typeof editor.config.pageStyleSheets !== 'undefined' )
    {
      for ( var i = 0; i < editor.config.pageStyleSheets.length; i++ )
      {
        if ( editor.config.pageStyleSheets[i].length > 0 )
        {
          html += "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + editor.config.pageStyleSheets[i] + "\">";
          //html += "<style> @import url('" + editor.config.pageStyleSheets[i] + "'); </style>\n";
        }
      }
    }

3. customize Xinha.addCoreCSS and Xinha.stripCoreCSS, such then when save, the CSS won't get save.
4. customize getInnerHTML such that when switch between "textmode" & "wysiwyg" mode, strip or add the CSS accordingly.

Cheers!

Offline

Board footer

Powered by FluxBB