我在cakephp应用程序中使用ckeditor,编辑器可见,但表单无法提交。而它在另一页面上工作正常。我无法理解这背后的原因。
请在下面找到代码:
<?php
echo $this->Html->css('jquery-ui');
echo $this->Html->script('/ckeditor/ckeditor', false);
?>
<div class="faqs form">
<?php echo $this->Form->create('Faq'); ?>
<fieldset>
<legend><?php echo __('Add Faq'); ?></legend>
<?php
echo $this->Form->input('question');
echo $this->Form->input('answer', array('class'=>'ckeditor'));
?>
</fieldset>
<?php echo $this->Form->end(__('Submit')); ?>
</div>
提前感谢。
答案 0 :(得分:0)
<div class="faqs form">
<?php echo $this->Form->create('Faq'); ?>
<fieldset>
<legend><?php echo __('Add Faq'); ?></legend>
<?php
echo $this->Form->input('question');
echo $this->Form->input('answer', array('class'=>'ckeditor'));
?>
</fieldset>
<?php echo $this->Form->end(__('Submit')); ?>
</div>
注意1:将整个ckeditor复制到(webroot / js / ckeditor)中的文件夹中并粘贴到此处。
注2:在页面末尾加载ckeditor
<?php echo echo $this->Html->script('ckeditor/ckeditor'); ?>
答案 1 :(得分:0)
这可能是原因:
我认为默认情况下,CakePHP会将所有输入视为&#39; text&#39;的类型。你需要定义输入是&#39; textarea&#39;。
Dim j,e,f as integer
Dim osh as shape
Dim osl as slide
Dim smrtCount as integer
Dim osmrtSize()
dim osmrtSizeMatch()
set osl = activewindow.view.slide
For each
With osh in osl.shapes
If .Type = msoSmartArt Then
smrtCount = smrtCount + .GroupItems.Count
ReDim Preserve osmrtSizeMatch(1 To smrtCount)
ReDim Preserve osmrtSize(1 To smrtCount)
For j = 1 To .GroupItems.Count
e = e + 1
f = f + 1
osmrtSize(e) = .GroupItems(j).TextFrame.TextRange.Runs(j).Font.Size 'store the sizes
osmrtSizeMatch(f) = .GroupItems(j).TextFrame.TextRange.Runs(j).Text '& " = " & .GroupItems(j).TextFrame.TextRange.Runs(j).Font.Size '& vbCrLf
Next j
End If