问题标签 [django-wysiwyg]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
317 浏览

django - django-wysiwyg-redactor doesn't work in inlines

So I am using django-wysiwyg-redactor==0.4.9 and Django==1.9. The issue described here.

I tried a trick in comments, but that didn't help. Also in browser's console I run this code directly to needed textarea:

But anyway there are no redactor on it. Textarea element looks like this before and after running above code:

Strange thing is that this code, that I found in jquery.redactor.init.js from package files is not working:

Any ideas?

UPD:

Well, I still don't know why it happpens, but I solved this problem by including redactor.js file from package files and adding a little changes to above script:

UPD 2:

Using this soution there is no plugins and image/file handlers. So I researched a little and found this article.

But image and file handling already implemented in django-wysiwyg-redactor, so I need just to use RedactorUploadView(). Urls can be found in urls.py file from sources. So here is the code:

0 投票
2 回答
990 浏览

django - Django CMS 中用户的所见即所得表单

最近我开始使用 Django CMS,结果证明它是 Web 开发人员的好工具。但到目前为止我无法实现的一件事是为用户创建一个表单,以便他们可以提交一些使用所见即所得编辑器创建的内容。我想也许有一些简单的方法可以在管理面板中添加可用的编辑器(用于创建/修改文本插件的编辑器),不幸的是似乎不是这样。

长话短说 - 我想让用户使用管理面板中可用的相同 WYISWYG 编辑器,而无需授予他们访问管理面板的权限。可能吗?或者我是否必须使用一些额外的扩展,以便我可以在我的页面上嵌入类似的编辑器?

0 投票
1 回答
245 浏览

django - 如何修改 AWS 静态文件的 Django 设置以适应 django summernote

我正在使用 django-summernote 作为所见即所得的编辑器。编辑器在我的开发阶段工作正常。我的 Django 设置使用下面的代码

但是,当我切换到将静态文件保存在 AWS 上的生产环境时。我没有看到summernote 所见即所得的编辑器。事实上整个文本字段都消失了。此外,我的静态文件与其他所有文件完美配合。我style.css 在 aws 上的文件与我的开发阶段完全相同,下面是我的 AWS 设置

我怎样才能解决这个问题。如果您需要更多信息,请告诉我。我很乐意提供

0 投票
0 回答
32 浏览

javascript - 如何在使用 iframe 创建的所见即所得编辑器中禁用内联 css 输入?

我用 javascript execCommand 创建了简单的 WYSIWYG 编辑器。这对我来说可以。但是,如果用户在通过浏览器中的元素部分提交表单之前编辑内容怎么办。如何在提交之前保护这些 html 元素?如果用户将内联样式添加到某些元素,例如位置固定?然后它将在数据库中保存这些更改的帖子,这将导致显示数据出现问题。我正在使用 django。