I try to find a way to auto insert code or text to every article on submission. I find this article on joomla https://docs.joomla.org/Add_text_to_an_article_using_template_overrides ,that uses template overrides to make this happen.Using this code:
var text = <?php
$addToText = '<p>Joomla! automatically added this text.</p>';
if (strpos($this->article->text, $addToText) == 0) {
$this->article->text .= $addToText;
}
echo $this->editor->getContent( 'text' ); ?>
on form.php file
,but this article is very old, i guess from joomla 1.5...