=== TinyMCE:Editor Template Files ===
Contributors: hana015
Donate link:
Plugin URL: https://wordpress.org/plugins/editor-template-files/
Tags: tinymce, editor, template
Requires at least: 3.9
Tested up to: 4.8
Stable tag: 1.0.5
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Editor Template Filesは、WordpressでTinyMCE(ビジュアルエディタ)のテンプレート機能を利用できるようにします。
テンプレートは、ファイルベースで作成し、編集可能な領域や編集不可の領域を作ることができます。
You can templates available in Wordpress' s visual editor "TinyMCE".
You can create a template with the file and set the noneditable & editable area in your template.
== Description ==
Editor Template Filesは、WordpressでTinyMCE(ビジュアルエディタ)のテンプレート機能を利用できるようにします。
テンプレートは、ファイルベースで作成し、編集可能な領域や編集不可の領域を作ることができます。
* [サポートサイト](https://labo.hanabanadesign.com/editor-template-files/)
## Introduction ##
### Features ###
* ビジュアルエディタ「TinyMCE」で、テンプレートを利用できます。
* ファイルベースでのテンプレート作成。
* テンプレートに編集不可・可能領域を設定できます。
* テンプレート読み込み時にあらかじめ設定した値を置き換えることができます。
### How to use ###
1. Install & Activate the plugin.
2. Create & Upload Your Template.(check below or our site.)
3. Use Your Template.
#### How to use Sample Template ####
1. copy from “sample” folder.
sample template foler:
`/wp-content/plugins/editor-template-files/sample/〜`
2. move to “Your Theme Folder”.
`/wp-content/plugins/editor-template-files/sample/〜`
↓
`/wp-content/themes/Your Theme Folder/sample/〜`
4. rename folder to “editor-template-files” from “sample”.
`/wp-content/themes/Your Theme Folder/editor-template-files/〜`
5. If you want to check beautiful style sample.
Please check below.
please add this code to `functions.php`.
`add_editor_style( 'editor-template-files/custom-editor-style.css' );`
Notes:
It may affect all editor styles.
We recommend that you cancel when you no longer need it.
4. If you want to check perfect sample.
Please check below.
please add this code to `functions.php`.
add_filter('etf_tpl_values', 'hoge');
function hoge( $values ) {
global $post_id;
$values['sample_value'] = 'Editor Template Files
Sample Page !!';
$values['date'] = get_the_time( 'Y-m-d', $post_id );
$values['etf_plugin_autor'] = 'hana';
return $values;
}
Thank you for sample settings.
You can experience the sample with this.
#### Create Your Template ####
1. create folder and file in “Your Theme Folder”.
`/Your Theme Folder/editor-template-files/template/***.php`
2. write “Template Info” in your template.
/**
*
* Editor Template Files Name: Sample Template
* Description: This is a Sample Template.
*/
“Editor Template Files Name: ” will “Template Title” when you select Template.
“Description: ” will “Template Description” when you select Template.
3. write template As you like.
Notes:
You must write your code inside “mceTmpl” Class.