すべての joomla インライン スタイリングを無効にする必要があります。
私の質問は、テキスト エディターに関するものではありません。ほとんどのシナリオでは、インライン スタイルはまったく役に立ちません。
特にカスタムテンプレートを使用した現在のプロジェクトでは、本当に足を引っ張っています。
解決策はありますか?またはプラグイン?(私は検索しました)
すべての joomla インライン スタイリングを無効にする必要があります。
私の質問は、テキスト エディターに関するものではありません。ほとんどのシナリオでは、インライン スタイルはまったく役に立ちません。
特にカスタムテンプレートを使用した現在のプロジェクトでは、本当に足を引っ張っています。
解決策はありますか?またはプラグイン?(私は検索しました)
これにより、インラインの「スタイル」属性がすべての要素から削除されることに注意してください。
<script type="text/javascript">
(function($){
$(document).ready(function(){
$(this).find("*").removeAttr("style");
});
})(jQuery);
</script>
絶対に効果的にする</body>
には、要素に css("something") を追加する他の jQuery スクリプトがある場合に備えて、タグの直前に配置します。
これは、クラス、スタイル、タイトル、幅などのプロパティを含む要素を見つけるために実行して使用できる簡単なプラグインです。http://jsfiddle.net/SyFum/2/のフィドル
<script type="text/javascript">
(function ($) {
$( document ).ready( function () {
/**
* Highlight all elements that contain an attribute
* @param attributeToSearch string The attribute to be found
* @returns {*} The elements, containing the attribute, bordered
*/
$.fn.StyleHighlighter = function (attributeToSearch) {
// set the defaults
var defaults = {
attributeToSearch : "style"
};
$( this ).find( "*" ).each( function () {
if ($( this ).attr( attributeToSearch ))
{
$( this ).css( "border", "1px dashed #ff0000" );
}
} );
return this;
};
// Usage (style, class, title, whatever)
$( this ).StyleHighlighter( "style" );
} );
})( jQuery );
</script>