在 django 中调整 TinyMCE 的大小
我正在尝试编写一个小部件来调整我的django tinymce大小,但似乎没有用...
有人知道此代码段问题是什么?
from django import forms
from .models import blog, comment, reply, like, subscription
from tinymce.widgets import TinyMCE
class blogform(forms.ModelForm):
class Meta:
model = blog
fields = ['content', 'title', 'blog_pic']
widgets = {'content': (TinyMCE(attrs={'style':'height:100vh; width:60%'}))}
I am trying to write a widget to resize my django tinymce but it doesn't seem to work...
Does anyone know what the problem is with this code snippet?
from django import forms
from .models import blog, comment, reply, like, subscription
from tinymce.widgets import TinyMCE
class blogform(forms.ModelForm):
class Meta:
model = blog
fields = ['content', 'title', 'blog_pic']
widgets = {'content': (TinyMCE(attrs={'style':'height:100vh; width:60%'}))}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我弄清楚了问题是什么;我的静态文件夹中有一个app.js文件,该文件具有为Tinymce编辑器设计的配置。我要做的就是更改宽度或高度以满足我的需求...这是代码
I figured out what the problem was;I had an app.js file in my static folder that had a configuration to style the tinymce editor; all i had to do was change the width or height to fit my needs...this is the code