Ckeditor is not <textarea>
, is contentEditable
(or docMode
), in any way I think it is impossible to prevent the user from interacting with the element, this because the control is all of the user in the contentEditable
What I recommend is to add the element later, for example at the time of sending the form or saving the form data somewhere, assuming you use PHP, so just insert when you took the data on the server, something like:
if (isset($_POST['dados'])) {
$dados = $_POST['dados']; //Dados do textarea
$dados .= '<div>Assinatura etc</div>'; //Adiciona uma assinatura
}
This is an example just to understand, in case of injecting in a specific place you can use DOMDocument::loadHTML
to make HTML work with PHP and then use one of the following functions to select the exact location you want to inject a specific tag:
DOMDocument::getElementsByTagNameNS
DOMDocument::getElementsByTagName
DOMDocument::getElementById
Or use the Domxpath class to select (which is much more advanced and can simplify work depending on the complexity of the selection type):
And then with one of the following functions:
Depends a lot on the need, between these two.