From 4ff3f66c069f15e582c59af0df8f93bc7b9002f8 Mon Sep 17 00:00:00 2001 From: agusmakmun Date: Thu, 5 Jan 2017 23:53:06 +0700 Subject: [PATCH] fixed JSON.parse --- draceditor/__init__.py | 2 +- draceditor/static/js/draceditor.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/draceditor/__init__.py b/draceditor/__init__.py index 97f0798db..eef5ecb80 100644 --- a/draceditor/__init__.py +++ b/draceditor/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -__VERSION__ = '1.1.1' +__VERSION__ = '1.1.2' __AUTHOR__ = 'Agus Makmun (Summon Agus)' __AUTHOR_EMAIL__ = 'agus@python.web.id' diff --git a/draceditor/static/js/draceditor.js b/draceditor/static/js/draceditor.js index 836859574..1885d4438 100644 --- a/draceditor/static/js/draceditor.js +++ b/draceditor/static/js/draceditor.js @@ -1,5 +1,5 @@ /** - * Name : DracEditor v1.1.1 + * Name : DracEditor v1.1.2 * Created by : Agus Makmun (Summon Agus) * Release date : 5-Jan-2017 * Official : https://dracos-linux.org @@ -132,7 +132,8 @@ } } // Set autocomplete for ace editor - if (draceditor.data('enable-configs').mention === 'true') { + var configs = JSON.parse(draceditor.data('enable-configs').replace(/'/g, '"')); + if (configs.mention === 'true') { editor.completers = [emojiWordCompleter, mentionWordCompleter] }else { editor.completers = [emojiWordCompleter]