Skip to content

Commit

Permalink
Fixed #1121 - codesnippet was wrong when re-entering ckeditor
Browse files Browse the repository at this point in the history
  • Loading branch information
torinfo committed Jun 30, 2022
1 parent 3da65e5 commit 957b6de
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions editor/js/toolbox.js
Expand Up @@ -3743,13 +3743,18 @@ var EDITOR = (function ($, parent) {
case 'text':
case 'script':
case 'html':
case 'textarea':
case 'textarea':
var id = "textarea_" + form_id_offset;
var textvalue = "";

form_id_offset++;

if (value.toLowerCase().indexOf('<textarea') == -1) textvalue = value;
// Set the value after initialisation of ckeditor in case of use of textarea, pre and code tags
const lcvalue=value.toLowerCase();
if (lcvalue.indexOf('<textarea') == -1
&& lcvalue.indexOf('<pre>') == -1
&& lcvalue.indexOf('<code>') == -1)
textvalue = value;

var textarea = "<textarea id=\"" + id + "\" class=\"ckeditor\" style=\"";
if (options.height) textarea += "height:" + options.height + "px";
Expand Down

0 comments on commit 957b6de

Please sign in to comment.