Index of /flone/jdc/enseignant/xinha/plugins/InsertSnippet

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory   -  
[TXT]InsertSnippet.css 2022-11-26 11:10 1.2K 
[   ]demosnippets.js 2022-11-26 11:10 1.5K 
[DIR]img/ 2022-11-26 15:06 -  
[   ]insert-snippet.js 2022-11-26 11:10 2.1K 
[DIR]lang/ 2022-11-26 15:06 -  
[DIR]popups/ 2022-11-26 15:06 -  
[TXT]snippets.html 2022-11-26 11:10 1.0K 
[TXT]snippets.php 2022-11-26 11:10 508  

InsertSnippet for Xinha

InsertSnippet for Xinha

Insert HTML fragments in your document.

Usage

In order to use your own snippets you have to al least one parameter to your xinha_config:

xinha_config.InsertSnippet.snippets = _editor_url+"plugins/InsertSnippet/snippets.php";

The path above indicates the use of the provided backend. This parses a file that contains the snippets and should have the following format:

<!--Snippet ID-->
Snippet content
<!--/Snippet ID-->
...and so on

You can use the snippets.html in the plugin folder or tell the backend where to find the file like this

with (xinha_config.InsertSnippet)
{
	<?php

	// define backend configuration for the plugin
	$backend_data['snippets_file'] = '/file/containing/snippets.html';
	require_once '../contrib/php-xinha.php';
	xinha_pass_to_php_backend($backend_data);
    
	?>
}

Raimund Meyer (xinha@raimundmeyer.de)