1

私はN2 cmsを使用していますが、それは本当に仕事です.Html Textエディターでテキストの色を変更できるようにしたいのですが、これ以外に必要なものはすべてあります.

それは簡単にできますか?

4

1 に答える 1

1

css ファイルに移動し、color 属性を持つクラスを配置します。次に、Html Text Editor に移動して、このクラスを参照します。これはいくつかのコードです。

あなたのスタイルシートで:

   .textColor
   {
       color:Red;
   }

Html テキスト エディターで:

 <h1 class="textColor"> the text is in red</h1>

編集

最良の方法

次のコードを Web.config/n2/edit タグに入れることで、tinyMCE でフォアカラーを有効にできます。

 <tinyMCE enabled="true">
        <settings> 
          <add key="theme_advanced_buttons1" value="bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,fontselect,fontsizeselect"/>
          <add key="theme_advanced_buttons2" value="cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor"/>
          <add key="extended_valid_elements" value="hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style],pre[class],code[class],iframe[src|name|class|style|frameborder]"/>
          <add key="theme_advanced_disable" value="help,paste,emotions,iespell,styleprops"/>
          <add key="relative_urls" value="true"/>
          <add key="apply_source_formatting" value="true"/>
        </settings>
      </tinyMCE>
于 2011-06-08T06:52:51.223 に答える