Bug fix to prevent jQuery add extra code
This commit is contained in:
parent
376a7c6909
commit
eb31e298da
@ -347,7 +347,7 @@ echo Bootstrap::formOpen(array(
|
||||
</div>
|
||||
|
||||
<!-- Editor -->
|
||||
<div id="jseditor" class="editable h-100" style=""><?php echo $page->contentRaw(false) ?></div>
|
||||
<textarea id="jseditor" class="editable h-100" style=""><?php echo $page->contentRaw(false) ?></textarea>
|
||||
|
||||
</form>
|
||||
|
||||
|
@ -318,7 +318,7 @@ echo Bootstrap::formOpen(array(
|
||||
</div>
|
||||
|
||||
<!-- Editor -->
|
||||
<div id="jseditor" class="editable h-100 mb-1"></div>
|
||||
<textarea id="jseditor" class="editable h-100 mb-1"></textarea>
|
||||
|
||||
</form>
|
||||
|
||||
|
@ -89,10 +89,7 @@ class pluginsimpleMDE extends Plugin {
|
||||
}'.PHP_EOL;
|
||||
|
||||
$html .= '$(document).ready(function() { '.PHP_EOL;
|
||||
$html .= '
|
||||
var currentContent = $( "#jseditor" ).html();
|
||||
$( "#jseditor" ).replaceWith( "<textarea id=\"jseditor\">"+currentContent+"</textarea>" );
|
||||
simplemde = new SimpleMDE({
|
||||
$html .= 'simplemde = new SimpleMDE({
|
||||
element: document.getElementById("jseditor"),
|
||||
status: false,
|
||||
toolbarTips: true,
|
||||
|
Loading…
Reference in New Issue
Block a user