2

tinyMCEエディターに追加のボタンを実装しようとしています。例として、html(ソース)ボタンの参照であるlocalhost:61025 / Web / Scripts / tinymce / themes / Advanced/source_editor.htmのソースを使用しました。

画像を見る

次のような自分のファイルを参照するボタンを作成するにはどうすればよいですか。

<input type=button value=html onclick="open_source_html()">

そして、open_source_html()は私の:localhost:61025 / Web / Scripts / tinymce / themes / advanced/source_editor_CUSTOM.htmファイルのtinymcepopupを開く必要があります

私を助けてください。

4

2 に答える 2

2

Alonsリンクは良いものです。tinymce のプラグイン ディレクトリにあるいくつかのプラグインを参照することもできます。

tinyMCE.init({
    mode : "textareas",
    theme : "advanced",
    ...
    setup : function(ed) {
        // Add a custom button
        ed.addButton('yourbutton', {
            title : 'Your button',
            image : 'img/example.gif', // path to your image
            onclick : function() {
                // Add you own code to execute something on click
                open_source_html();
            }
        });
    }
)};
于 2013-01-31T10:00:15.993 に答える
1
tinyMCE.activeEditor.windowManager.open({
            url : 'http://localhost/Save.html',
            width : 520,
            height : 340,
            resizable : "yes",
            inline : true,
            close_previous : "yes"

            });

とった。みんなありがとう。

于 2013-01-31T19:36:28.293 に答える