File tree Expand file tree Collapse file tree 3 files changed +31
-11
lines changed
Expand file tree Collapse file tree 3 files changed +31
-11
lines changed Original file line number Diff line number Diff line change 5454
5555# https://getuikit.com/docs/htmleditor.html#javascript-options
5656DRACEDITOR_EDITOR_OPTIONS = getattr (
57- settings , 'DRACEDITOR_EDITOR_OPTIONS' , "{markdown:true}"
57+ settings , 'DRACEDITOR_EDITOR_OPTIONS' , {
58+ 'markdown' : 'true' ,
59+ 'toolbar' : [
60+ 'bold' , 'italic' , 'strike' ,
61+ 'link' , 'image' , 'blockquote' ,
62+ 'listUl' , 'listOl' , 'upload' ,
63+ ]
64+ }
5865)
59- """
60- {
61- 'markdown': 'true',
62- 'toolbar': [
63- 'bold', 'italic', 'strike',
64- 'link', 'picture', 'blockquote',
65- 'listUl', 'listOl', 'upload'
66- ]
67- }
68- """
Original file line number Diff line number Diff line change @@ -140,3 +140,23 @@ $(function() {
140140 $ ( '.draceditor' ) . draceditor ( ) ;
141141} ) ;
142142} ) ( jQuery ) ;
143+
144+ // Development mode:
145+ // * http://stackoverflow.com/a/27417339/6396981
146+ // * http://cgit.drupalcode.org/uikitapi/tree/uikit/js/components/htmleditor.js?id=6b5fc5f8d767b7e2b70c44e7e01b949b89870d8f
147+ /*
148+ $(document).ready(function(){
149+ var textArea = document.getElementById('id_description');
150+ var editor = CodeMirror.fromTextArea(textArea, {
151+ onKeyEvent: function(e , s){
152+ if (s.type == "keyup") {
153+ console.log("test");
154+ }
155+ }
156+ });
157+ console.log(editor);
158+ editor.on("keyup", function(editor, event) {
159+ console.log(editor);
160+ });
161+ });
162+ */
Original file line number Diff line number Diff line change @@ -52,6 +52,9 @@ class Media:
5252 'plugins/js/overlay.js' ,
5353 'plugins/js/xml.js' ,
5454 'plugins/js/marked.min.js' ,
55+
56+ # i dont't know if use this editor,
57+ # the `emoji` and `mention` is't work well.
5558 'plugins/js/htmleditor.js' ,
5659
5760 'plugins/js/caret.min.js' ,
You can’t perform that action at this time.
0 commit comments