我试图在AJAX中提交我的表单,所以我必须序列化()数据.但我正在使用fckEditor
和jQuery不知道如何处理它,所以序列化后,我试图手动修改值,但到目前为止没有运气...任何想法
if(content_val!=""){
var values = $("#frmblog").serialize();
values.content = content_val; //content_val is the manually fetched data which I am trying to insert into the serialized content.
alert(content_val); alert(values);
}
Run Code Online (Sandbox Code Playgroud) 我正在尝试找到一个避免CKEditor的解决方案,但是旧的FCKeditor也会删除<i>
之前插入的内容到db的任何
标记.
案件:
我将html内容插入到db中,一些内容包含<i>
元素.我是用CKEditor做的.一切都很完美,内容显示在网页上.但是,当我想编辑以前插入的内容时,<i>
元素丢失了.
在我的具体情况下,我使用:
<i class="fa-icon-fullscreen fa-icon-xxlarge main-color"></i>
Run Code Online (Sandbox Code Playgroud)
当然如果我禁用编辑器,内容在textarea中显示得很好.
CKEditor网站有点缺乏; 你能告诉我如何从CKEditor中删除状态栏('body ul li ...')吗?
编辑器底部有一个HTML列表 - body p ul li - 表示将如何生成键入的文本,我想删除此列表.
我似乎无法根据文档销毁CKEdit的实例.
考虑以下:
<input name="txt1" type="text" id="txt1" /><br />
<a href="javascript:void(0);" onclick="create()">Create</a><br />
<a href="javascript:void(0);" onclick="destroy()">Destroy</a>
<script type= "text/javascript" >
<!--
function create() {
var hEd = CKEDITOR.instances['txt1'];
if (hEd) {
CKEDITOR.remove(hEd);
}
hEd = CKEDITOR.replace('txt1');
}
function destroy(){
var hEd = CKEDITOR.instances['txt1'];
if (hEd) {
CKEDITOR.remove(hEd);
}
}
-->
</script>
Run Code Online (Sandbox Code Playgroud)
当destroy()运行时,CKEDITOR.remove(hEd); 被称为.多次单击create()会在屏幕上生成多个CKEditor实例,但它们的实例不再出现在CKEDITOR.instances中.
我错过了什么吗?
我打算在商业网站上使用CKEditor.我已经阅读了http://ckeditor.com/license,但我不明白在提供LGPL(这是商业用途的不错选择)的同时可以为商业用途定价的方式.
我有一个包含几个字段的HTML表单.其中一个是由CKEditor管理的textarea.
当用户想要提交表单时,我想检查他是否在所有字段中输入了值.
我知道如何检查CKEditor控件是否包含任何内容,但它可能是"空"HTML标记,其中没有任何文本.
我该如何查看文字?
服务器端我使用的是像PHP的trim(strip_tags($ content))之类的东西,所以我想在JavaScript中使用相同的东西.
使用jQuery的解决方案也是可用的.
有没有办法将光标设置在CKEditor内容的末尾?
这位开发人员也问过,但没有得到答案:
http://cksource.com/forums/viewtopic.php?f=11&t=19877&hilit=cursor+end
我想将焦点设置在CKEditor内的文本末尾.我用的时候:
ckEditor.focus();
Run Code Online (Sandbox Code Playgroud)
它将我带到CKEditor内部的文本的开头.
我过去一直在为我的几个客户站点使用FCK编辑器.最近由于一些新的浏览器安全更新(我假设),一些功能现在正在破坏.
我计划将这些网站更新到最新版本,但有时我认为FCK过于复杂,往往会让我的客户感到困惑,而不是帮助他们.
什么其他HTML WYSIWYG(如果有这样的东西)是好的.关于我想要保留的FCK,我真的很喜欢的一些项目:
谢谢
在CodeProject为FCKEditor 看了这篇文章.有人可以解释新版本的内容吗?
我正在尝试允许管理员用户编辑电子邮件模板.这些模板作为Twig存储在DB中.所以它们中的变量被设置为,{{ purchase.number }}
并且有类似的循环
{% if cart['shipping'] %}
{% for line in cart['shipping'] %}
<tr>
<td colspan="7">Shipping ({{ line['text'] }})</td>
<td>US${{ line['money'] }}</td>
</tr>
{% endfor %}
{% endif %}
Run Code Online (Sandbox Code Playgroud)
下面是我可以重现此问题的模板之一:
<html>
<body>
<h3>Order #{{ purchase.number }} was cancelled</h3>
<p>Order content:</p>
<table>
<tr>
<th>Line</th>
<th>Item #</th>
<th>Product Name</th>
<th>Shipping</th>
<th>UOM</th>
<th>Unit Price</th>
<th>Quantity</th>
<th>Subtotal</th>
</tr>
{% for line in cart['cart'] %}
<tr>
<td>{{ line['LineNo'] }}</td>
<td>{{ line['ItemNo'] }}</td>
<td>{{ line['ProductName'] }}</td>
<td>{{ line['Shipping'] }}</td>
<td>{{ line['UOM'] }}</td> …
Run Code Online (Sandbox Code Playgroud)