1

私は TinyMCE を使用しており、ユーザーがフォント サイズを 1 つの事前定義されたサイズ (大きい) に変更できるようにしたいと考えています。

私はこのカスタム設定でそれを行うことができました:

font_size_style_values: "large,x-small,small,medium,large,x-large,xx-large",
theme_advanced_font_sizes: "1",

ただし、フォント サイズの選択ドロップダウン リストに表示されるテキストは「1 (8pt)」であり、ユーザー フレンドリーではありません。

これを「大」などに変更したいと思います。何か案は?

それが役立つ場合、ここに私の完全なカスタム設定があります:

tinyMCE.init({
    mode: "exact",
    elements: "Details", // "EventDetails_Directions, EventDetails_Details"
    width: "673",
    height: "320",
    theme: "advanced",
    plugins: "paste, media",
    autocomplete: "off",
    convert_fonts_to_spans : true,
    theme_advanced_buttons1: "bold,italic,underline,justifyleft,justifycenter,fontsizeselect,link,unlink,image,bullist,separator,undo,redo,code",
    theme_advanced_buttons2: "",
    theme_advanced_buttons3: "",
    font_size_style_values: "large,x-small,small,medium,large,x-large,xx-large",
    theme_advanced_font_sizes: "1",
    paste_auto_cleanup_on_paste: true,
    paste_remove_styles: true,
    paste_retain_style_properties: "none",
    paste_strip_class_attributes: "all",
    paste_preprocess: function(p1, o) {
        o.content = replaceWordChars(o.content);
    },
    content_css: "/ClientControlRoom/assets/css/tinymce_custom.css"
});
4

1 に答える 1

3

TinyMCE 3.2 以降のtheme_advanced_font_sizes 構成オプションにより、テキスト値をフォント サイズ (ピクセルまたは相対) またはクラスにマップできるようになりました。

したがって、ドロップダウンでユーザーに1つのオプション(「大」)のみが必要な場合は、次のようにすることができます

theme_advanced_font_sizes : "large=30px"

または、単純な相対サイズを使用している場合

theme_advanced_font_sizes : "large"
于 2012-06-06T04:34:06.020 に答える