TinyMCEのテンプレートについて

2015年3月14日 at 0:04

古いconcrete5の記事でTinyMCEのテンプレートの追加方法というものを見つけました。
記事:
http://sharedhat.com/blog/1178/

5.6.3.2のバージョンを使って作成中なのですが、
TinyMCEのテンプレート機能を使用したいのですが、
テンプレートのボタン追加まではいけましたが、テンプレートの読み込みができません。
使用中のバージョンではできないのでしょうか。
「template_list.js」「some-template1.html」のファイルも下記に格納してあり、記述も問題ないと思います。

◆template_list.js
階層:/js/tiny_mce/lists/template_list.js
======================
var baseTemplatePath = "/js/tiny_mce/";
var tinyMCETemplateList = [
["テンプレート1", baseTemplatePath + "templates/some-template1.html", "テンプレート1です。"],
["テンプレート2", baseTemplatePath + "templates/some-template2.html", "テンプレート2です。"]
];
======================
◆some-template1.html
階層:/js/tiny_mce/templates/some-template1.html
======================
<div class="mceTmpl">
<div class="hd">
<h3>some title</h3>
</div>
<div class="bd">
<p>some contents</p>
</div>
</div>
======================

◆記事ブロックエディター設定
======================
theme : "concrete",
plugins: "inlinepopups,spellchecker,safari,advlink,template",
editor_selector : "ccm-advanced-editor",
spellchecker_languages : "+English=en",
theme_concrete_buttons1 : "undo,redo,pastetext,pasteword,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect",
theme_concrete_buttons2 : "formatselect,bullist,numlist,|,outdent,indent,|,hr,charmap,|,forecolor,backcolor,|,link,unlink,anchor,template",
theme_concrete_buttons3 : "image,cleanup,code",
theme_concrete_blockformats : "p,address,pre,h1,h2,h3,div,blockquote,cite",
theme_concrete_toolbar_align : "left",
theme_concrete_fonts : "Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",
theme_concrete_font_sizes : "1,2,3,4,5,6,7",
theme_concrete_styles: "Note=ccm-note",
spellchecker_languages : "+English=en"
template_external_list_url: "/js/tiny_mce/lists/template_list.js",
template_cdate_classes : "cdate creationdate",
template_mdate_classes : "mdate modifieddate",
template_selected_content_classes : "selcontent",
template_cdate_format : "%m/%d/%Y : %H:%M:%S",
template_mdate_format : "%m/%d/%Y : %H:%M:%S"
/*
// Use the advanced theme for more than two rows of content
plugins: "inlinepopups,spellchecker,safari,advlink,table,advhr,xhtmlxtras,emotions,insertdatetime,paste,visualchars,nonbreaking,pagebreak,style",
editor_selector : "ccm-advanced-editor",
theme : "advanced",
theme_advanced_buttons1 : "cut,copy,paste,pastetext,pasteword,|,undo,redo,|,styleselect,formatselect,fontsizeselect,fontselect",
theme_advanced_buttons2 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,outdent,indent,blockquote,|,link,unlink,anchor,|,forecolor,backcolor,|,image,charmap,emotions",
theme_advanced_fonts : "Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",
// etc.
*/
======================
お助け下さい。

タグ:

Re: TinyMCEのテンプレートについて

2015年4月3日 at 16:55
解決できました。

template_external_list_url: "/js/tiny_mce/lists/template_list.js",
↑のパスが間違っておりました。

単純なミスです。 
 

Re: TinyMCEのテンプレートについて

2015年4月3日 at 16:56
解決できました。

template_external_list_url: "/js/tiny_mce/lists/template_list.js",
↑のパスが間違っておりました。

単純なミスです。 
 

Re: TinyMCEのテンプレートについて

2015年6月16日 at 14:55
お世話様になります。
noliekickflipと申します。
concrete5を使い始めて1週間です。
現在、5.6.3.3 を利用して色々と試しております。

TinyMCEへテンプレートを追加したく検索したところ
toguchiさんが参考にされていたURLへたどり着いたのですが
コピペしても、ならず…さらに検索したところ
このコミュニティ記事にたどり着きました。

> template_external_list_url: "/js/tiny_mce/lists/template_list.js",
> ↑のパスが間違っておりました。
上記にて、解決されたそうですが
ファイル名を色々と変更してみたのですが、解決できずにいます。

よろしければ詳しく教えて頂けないでしょうか。
よろしくお願い致します。
 

Re: TinyMCEのテンプレートについて

2015年6月17日 at 12:23
記事ブロックエディター設定で
↓の記述のカンマ漏れ、などないですか?
spellchecker_languages : "+English=en",
template_external_list_url: "/js/tiny_mce/lists/template_list.js",
※最後の行はカンマなしです。

それでもダメでしたらthemeをadvancedにしてはいかがでしょうか?
私は添付の設定で問題なく動いております。
添付: advanced.txt
 

Re: Re: TinyMCEのテンプレートについて

2015年6月17日 at 13:05
toguchiさん、ご回答頂きありがとうございます。

カンマ漏れ、最後の行のカンマなしは確認したところ大丈夫でした。
添付頂いた、advanced.txt にて設定してみたのですが
4行目に「templateボタン」が表示されない現象がおきております^^;
(添付画像参照)
 

Re: Re: TinyMCEのテンプレートについて

2015年6月17日 at 16:22
toguchiさん、ご回答頂きありがとうございます。

カンマ漏れ、最後の行のカンマなしは確認したところ大丈夫でした。
添付頂いた、advanced.txt にて設定してみたのですが
4行目に「templateボタン」が表示されない現象がおきております^^;
(添付画像参照)