diff --git a/assets/js/ttveditor.js b/assets/js/ttveditor.js index bd5700c..3190fdb 100644 --- a/assets/js/ttveditor.js +++ b/assets/js/ttveditor.js @@ -1,10 +1,10 @@ (function(){ // Character limit settings from localized script data - var softLimitText = parseInt(ttveditorData.soft_limit_text, 10); - var hardLimitText = parseInt(ttveditorData.hard_limit_text, 10); + var softLimitText = parseInt(teksttveditor_options.soft_limit_text, 10); + var hardLimitText = parseInt(teksttveditor_options.hard_limit_text, 10); - var softLimitTitle = parseInt(ttveditorData.soft_limit_title, 10); - var hardLimitTitle = parseInt(ttveditorData.hard_limit_title, 10); + var softLimitTitle = parseInt(teksttveditor_options.soft_limit_title, 10); + var hardLimitTitle = parseInt(teksttveditor_options.hard_limit_title, 10); function wpautop(text, br = true) { if (text.trim() === '') return ''; @@ -88,7 +88,7 @@ "body": wpautop(pageContent), "title": titleValue, "duration": 5000, - "image": ttveditorData.image_url + "image": teksttveditor_options.image_url }; var jsonString = JSON.stringify(data); @@ -129,12 +129,12 @@ var pageNum = index + 1; var length = pageText.trim().length; - // Soft limit warning in gray if (length >= softLimitText && length < hardLimitText) { + // Soft limit warning in gray warnings.push('