CKEditor is not <textarea>
, it is contentEditable
(or docMode
), anyway I think it is impossible to prevent the user from interacting with the element, because the control is all user contentEditable
What I recommend is to add the element later, for example when sending the form or saving the form data somewhere, assuming you use PHP, then just insert it when you got the data on the server, something like: p>
if (isset($_POST['dados'])) {
$dados = $_POST['dados']; //Dados do textarea
$dados .= '<div>Assinatura etc</div>'; //Adiciona uma assinatura
}
This is an example only to understand, in case of injecting into 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 the job depending on the complexity of the selection type):
And then with one of the following functions:
Depends heavily on the need between these two.