我已经为我的rails_admin集成了CKEditor。在edit页面中我添加了 CKEditor 并编写了文本。
在我的模型显示页面中,它向我显示如下:

我的代码show:
show do
include_all_fields
end
Run Code Online (Sandbox Code Playgroud)
我需要添加什么来显示我在 CKEditor 上编写的文本,能够在rails_admin 中显示?
====更新====
我已经config.assets.precompile += %w( ckeditor/* )在我的production.rb and development.rb. 然后我运行了 rake asset 预编译任务并重新启动了我的服务器。在我上面的图片中它仍然显示相同的内容。
即使可以以 html 格式显示文本,也会产生新的问题。正如您在图片中看到的,有一个img标签,它src显示的不是我上传的图片的完整目录。如果我需要将此格式化文本作为 JSON 发送到我的手机?
====更新====
我已经打开浏览器的代码检查器来查看description页面的一部分。它向我展示了这个:

我的html代码是用CKEditor创建的,写得很好,但是我的浏览器不认为它是html代码并且有引号。这些引号是否会影响我的浏览器将其显示为纯文本?
我已经在 laravel 5 中配置了 elfinder,也使用了 CKEditor。每一件事都很好,直到我点击浏览服务器按钮然后我得到"Class replace-this-with-your-middleware does not exist“错误。我在谷歌上搜索了很多,但我没有找到任何合适的答案。所以我把我的问题放在了希望中。请帮助我尽快解决这个问题。
我找不到限制 ckeditor 窗口高度的方法。
我已经尝试了通过谷歌找到的所有解决方案,但都不起作用:在 CKEDITOR 调用之后的表、div、配置命令应该可以工作,但不能:
<script type='text/javascript'>CKEDITOR.replace('cTitle1');CKEDITOR.config.height = '800px';</script>
Run Code Online (Sandbox Code Playgroud)
我有最新版本的ckeditor。
我不想在全球范围内限制它,只是特定的实例,因为有时我希望它是常规尺寸,有时我需要它不那么高。
提前致谢。
我尝试将类"table"并"table-striped"通过 yaml-File 添加到 TYPO3 8 中的 ckeditor。使用其他块标记或内联标记没有问题,但是对于表仍然存在类"contenttable"- 只有这个类,我不能添加其他类。我试过这个:
{ name: "Table", element: ['table','p'], attributes: { 'class': 'table' }}
{ name: "Table-Striped", element: ['table','p'], attributes: { 'class': 'table-striped' }}
Run Code Online (Sandbox Code Playgroud)
对于 p 可以(没有意义),但不适用于桌子。
我是 CkEditor 的新手,我已成功将编辑器集成并自定义到我的页面,但我无法上传图像。在 CkEditor 文档中,我发现他们使用 PhP 脚本上传文件,但我不确定如何将其添加到我的 ASP.NET MVC 项目中。
我正在尝试在页面中使用单个类添加多个 ckeditor。通过单击“添加更多”链接,我想添加动态 ckeditor。以下是我的代码。
<script src="https://cdn.ckeditor.com/4.11.3/standard/ckeditor.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript">
CKEDITOR.replace( 'editor1' );
</script>
<textarea class="editor1"></textarea>
<textarea class="editor1"></textarea>
<textarea class="editor1"></textarea>
<textarea class="editor1"></textarea>
Run Code Online (Sandbox Code Playgroud) 我想显示数据库中的数据(使用 PHPMYADMIN)。我想要显示的数据使用 ng2-ckeditor (Angular 6) 存储。因此,当它给出结果时,它还会显示 html 标签,这是我不想要的。如何在不显示 HTML 标签的情况下获取结果?
这是为了在html页面中显示
(并且 newsArray是对象类型)正在显示数据,但带有 html 标签
<div *ngFor="let item of newsArray">
<div class="panel-body">
{{item.details}}
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
给出的结果是:
<p>hello</p>
Run Code Online (Sandbox Code Playgroud)
但预期结果:
hello
Run Code Online (Sandbox Code Playgroud) 我是新手。我正在使用 Django 编写个人博客。我曾经CKEditor能够将图像插入到我的博客文章中。但是,我想在主页上显示帖子的一些第一句话,其中不包含帖子中的图像。我想知道是否有一种方法可以只从RichTextFieldin获取文本CKEditor获取文本。
这是我当前的预览内容:

我希望它是这样的(没有图像):

这是我当前的代码:
{% for post in post_list %}
<div class="card mb-4">
<div class="card-body">
<h2 class="card-title">{{ post.title }}</h2>
<p class="card-text text-muted h6">{{ post.Author }} | {{ post.created_on}} </p>
<p class="card-text">{{post.content|safe|truncatewords:20 }}</p>
<a href="{% url 'post_detail' post.slug %}" class="btn btn-primary">Read More →</a>
</div>
</div>
{% endfor %}
Run Code Online (Sandbox Code Playgroud) 我试图让工具栏具有响应能力,例如https://ckeditor.com/blog/CKEditor-5-v15.0.0-with-horizontal -line-page-break-responsive-toolbar-and- 上的示例SVG-上传-支持/ .
我的CkEditor插件都是19.0.0版本。我正在使用基于经典编辑器的自定义构建。
有人可以帮忙吗?医生告诉我们这必须自动发生。
谢谢!
我在我的项目中使用过Ckeditor.它运作良好.我可以把图片放在文本中但是有一个网址.我知道,如果我想从我的电脑上传一张照片,我必须使用CKfinder.如何将Ckfinder与Ckeditor一起使用?
我用这段代码来调用CKeditor:
protected void Page_Load(object sender, EventArgs e)
{
String StrScript = "CKEDITOR.replace( '" + TextBox1.ClientID + "',{toolbar : 'Full'});";
ClientScript.RegisterStartupScript(this.GetType(), "Ck-Js/ckeditor", StrScript, true);
}
Run Code Online (Sandbox Code Playgroud)
谢谢.
我需要从 CK 编辑器获取内容以将其放入 JQuery。
<form action="php/showcomments.php" method="post" onsubmit="return false;" >
<div class="text-cmt">
<input id="tittle" name="tittle" type="text" placeholder="Comment Title" id="comm" required/>
</div>
<div class="text-cmt">
<textarea id="msg" ></textarea>
</div>
<div class="text-cmt">
<input name="send" type="submit" value="send">
</div>
</form>
<script>
CKEDITOR.replace( 'msg' );
</script>Run Code Online (Sandbox Code Playgroud)
<script>
$(document).ready(function(){
var g_id = "<?= $id; ?>";
var u_id = "<?= userid; ?>";
// var comm = tinyMCE.editor.getContent();
//tinyMCE.get('editor').getContent()
$("form").submit(function(){
var comm = $("#tittle").val();
$.ajax({
url: 'php/showcomments.php', // form action url
type: 'POST', // form submit method get/post
data: …Run Code Online (Sandbox Code Playgroud)有人知道对CKEditor 4.0的url/cdn(外部公共)库引用吗?我需要用它来重现一个问题.