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>
|
</div>
|
||||||
|
|
||||||
<!-- Editor -->
|
<!-- 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>
|
</form>
|
||||||
|
|
||||||
|
|
|
@ -318,7 +318,7 @@ echo Bootstrap::formOpen(array(
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Editor -->
|
<!-- Editor -->
|
||||||
<div id="jseditor" class="editable h-100 mb-1"></div>
|
<textarea id="jseditor" class="editable h-100 mb-1"></textarea>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
|
@ -89,10 +89,7 @@ class pluginsimpleMDE extends Plugin {
|
||||||
}'.PHP_EOL;
|
}'.PHP_EOL;
|
||||||
|
|
||||||
$html .= '$(document).ready(function() { '.PHP_EOL;
|
$html .= '$(document).ready(function() { '.PHP_EOL;
|
||||||
$html .= '
|
$html .= 'simplemde = new SimpleMDE({
|
||||||
var currentContent = $( "#jseditor" ).html();
|
|
||||||
$( "#jseditor" ).replaceWith( "<textarea id=\"jseditor\">"+currentContent+"</textarea>" );
|
|
||||||
simplemde = new SimpleMDE({
|
|
||||||
element: document.getElementById("jseditor"),
|
element: document.getElementById("jseditor"),
|
||||||
status: false,
|
status: false,
|
||||||
toolbarTips: true,
|
toolbarTips: true,
|
||||||
|
|
Loading…
Reference in New Issue