Changeset 878


Ignore:
Timestamp:
08/13/07 22:31:43 (12 years ago)
Author:
ray
Message:

#1026 Skins referenced with <link>-tags don't work anymore

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XinhaCore.js

    r875 r878  
    20132013    if ( !found ) 
    20142014    { 
    2015       Xinha.loadStyle(_editor_css,null,"XinhaCoreDesign"); 
     2015      Xinha.loadStyle(_editor_css,null,"XinhaCoreDesign",true); 
    20162016    } 
    20172017  } 
     
    34823482 *                 or later removing it again 
    34833483 */ 
    3484 Xinha.loadStyle = function(style, plugin, id) 
     3484Xinha.loadStyle = function(style, plugin, id,prepend) 
    34853485{ 
    34863486  var url = _editor_url || ''; 
     
    35053505  link.type = "text/css"; 
    35063506  if (id) link.id = id; 
    3507   head.appendChild(link); 
     3507  if (prepend) 
     3508  { 
     3509    head.insertBefore(link,head.getElementsByTagName('link')[0]); 
     3510  } 
     3511  else 
     3512  { 
     3513    head.appendChild(link); 
     3514  } 
     3515   
    35083516}; 
    35093517 
     
    57525760{ 
    57535761    var coreCSS =  
    5754     "<style title=\"Xinha Internal CSS\" type=\"text/css\">" 
     5762    "<style id=\"XinhaInternalCSS\" type=\"text/css\">" 
    57555763    + ".htmtableborders, .htmtableborders td, .htmtableborders th {border : 1px dashed lightgrey ! important;}\n" 
    57565764    + "html, body { border: 0px; } \n" 
     
    57805788Xinha.stripCoreCSS = function(html) 
    57815789{ 
    5782   return html.replace(/<style[^>]+title="Xinha Internal CSS"(.|\n)*?<\/style>/i, '');  
     5790  return html.replace(/<style[^>]+id="XinhaInternalCSS"(.|\n)*?<\/style>/i, '');  
    57835791} 
    57845792/** Removes one CSS class (that is one of possible more parts  
Note: See TracChangeset for help on using the changeset viewer.