Я недавно клонировал скрипт, и хотя текстовая область CKEditor в оригинале работает нормально, в новом скрипте - нет.
Оригинальный скрипт имеет следующий код:
<td align="left" valign="top">Description: <a target="_blank" href="faq_bb.php#edit"><img title = "<?= $bb_help; ?>" alt="<?= $bb_help; ?>" height=17 width=19 border=0 src="/images2/query_icon.gif"></a>
</td>
<td valign=top align="left" colspan=2>
<?php
$winsize = strlen($bb_desc);
if ($winsize < 255)
{
$editorheight = 10;
}
else
{
$editorheight = 20;
}
$text = html_entity_decode($bb_desc, ENT_QUOTES);
?>
<textarea name="_bb_desc" cols=<?= $editorheight ?>>
<?= $text ?>
</textarea>
<script type="text/javascript">
CKEDITOR.replace( '_bb_desc');
</script>
</td>
Новый скрипт имеет:
<td align="left" valign="top">Description: <a target="_blank" href="faq_bb.php#edit"><img title = "<?= $bb_help; ?>" alt="<?= $bb_help; ?>" height=17 width=19 border=0 src="/images2/query_icon.gif"></a>
</td>
<td valign=top align="left" colspan=2>
<?php
$winsize = strlen($bb_desc);
if ($winsize < 255)
{
$editorheight = 10;
}
else
{
$editorheight = 20;
}
$text = html_entity_decode($bb_desc, ENT_QUOTES);
?>
<textarea name="_bb_desc" cols=<?= $editorheight ?>>
<?= $text ?>
</textarea>
<script type="text/javascript">
CKEDITOR.replace( '_bb_desc');
</script>
</td>
При просмотре отрисованной страницы в Инспекторе элементов веб-консоли оригинальный скрипт выдает:
<iframe src="" style="width: 100%; height: 100%;" class="cke_wysiwyg_frame cke_reset" title="Rich Text Editor, _bb_desc" aria-describedby="cke_87" tabindex="0" allowtransparency="true" frameborder="0"></iframe>
Новый скрипт выдает:
<iframe src="" style="width: 100%; height: 100%; display: none !important;" class="cke_wysiwyg_frame cke_reset" title="Rich Text Editor, _bb_desc" aria-describedby="cke_72" tabindex="0" allowtransparency="true" hidden="" frameborder="0"></iframe>
2 сценария выполняются в одной и той же среде с использованием одной и той же версии CKEditor (4.5.3.Full).
Любые предложения о том, что может быть причиной различного поведения, будут с благодарностьюполучил.