Comments (18)
yep, that's what I saw and tested it here. Again, many thanks for your fast response.
from flask-ckeditor.
There is a typo in your code: CKEDITOR_PKG_TYE
should be CKEDITOR_PKG_TYPE
.
from flask-ckeditor.
yeah, you're right. Well, that is just a typo here, in the actual file it is written correctly.
from flask-ckeditor.
Please try to update your init.py to this:
ckeditor = CKEditor()
def create_app(config_class = Config):
app = Flask(__name__)
app.config.from_object(config_class)
ckeditor.init_app(app) # <-- notice this line
...
from flask-ckeditor.
That gives a NameError 'ckeditor' is not defined.
from flask-ckeditor.
Could you provide the full traceback for the NameError
exception?
from flask-ckeditor.
That would be this. In the meantime, may I thank you for the very fast response to my issue :)
Traceback (most recent call last):
File "run.py", line 9, in
app = create_app()
File "/home/user/app/_init.py", line 26, in create_app
ckeditor.init_app(app)
NameError: name 'ckeditor' is not defined
from flask-ckeditor.
wait a minute. I made a type elsewhere... app is running now, but still, not in basic mode.
from flask-ckeditor.
You are welcome :p
Yeah, I notice you typo the ckeditor
to cdeditor
...
from flask-ckeditor.
But how to get it to basic mode? the ckeditor field is still default 'standard'...
from flask-ckeditor.
Please add this line under ckeditor.load()
in your template:
{{ ckeditor.config() }}
from flask-ckeditor.
You also need to pass the name
parameter, the value should be the name of CKEditor form field:
{{ ckeditor.config(name='Your CKEditor form field name') }}
from flask-ckeditor.
Tried both, with and without field name, but unfortunately still standard view. Am I missing something here?
from flask-ckeditor.
Are you sure you pass the correct name value? Also, please provide the rendered HTML source for the page.
from flask-ckeditor.
well, finally found the issue. Your hint on html source put me on the right track. There was an old link to ckeditor script still in the base html. Removed that, and now it works.
thanks anyway, and keep on the good work :)
from flask-ckeditor.
:)
from flask-ckeditor.
btw, in the template this part is not needed. loading is sufficient to get it working;
{{ ckeditor.config() }}
from flask-ckeditor.
You are right, I just found this part in docs:
Except
CKEDITOR_SERVE_LOCAL
andCKEDITOR_PKG_TYPE
, when you use other configuration variable, you have to callckeditor.config()
in template to make them register with CKEditor:
<body>
... <!-- {{ ckeditor.load() }} or <script src="/path/to/ckeditor.js"> -->
{{ ckeditor.config() }}
</body>
from flask-ckeditor.
Related Issues (20)
- codesnippet plugin 404 with CKEDITOR_SERVE_LOCAL = False HOT 4
- 如果我想实现文字居右,应该如何操作呢? HOT 1
- Image Upload Issue HOT 1
- AttributeError: 'NoneType' object has no attribute 'filename' HOT 5
- Add configuration CKEDITOR_CONTENTS_CSS
- is there a way to add babel/babelex support to translate the editor labels? HOT 8
- Documentation not available HOT 3
- Add example for external file browser integration
- Drop Python 2 support
- Move CI to GitHub Actions
- CKEditor fillEmptyBlocks Configuration
- Flask-CKEditor 1.0 Plan
- Markup removed in Flask 3.0.0 HOT 2
- Add readthedocs config file
- Format keys not working
- cleanify is missing HOT 1
- Code Snippet plugin not working in rendered HTML
- Where does the CKEditor Bundle go? HOT 2
- there is no static folder in pypi package 0.5.1
- there is no static folder in pypi package 0.5.1 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flask-ckeditor.