从数据库加载时无法解析ace编辑器中的javascript标记

I am using Live-HTML-CSS-Code-Editor to run HTML CSS javascript code on the browser that is working properly.

I saved all my codes in MySQL database tables from there I am showing the code to my editor this is working properly for HTML and CSS.

I am facing the problem if fetched database code has any </script> tag in it like

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> or any embeded <script>......</script> tag it in not showing code in ace editor

my ace editor code is https://github.com/78526Nasir/Live-HTML-CSS-Code-Editor/blob/master/index.html

using PHP to load data in the editor and showing data in the editor as follow

editor.setValue(`<?php echo $result[0]['code']; ?>`, 1);

How to resolve this?

When adding text to html page with php you need to use htmlspecialchars to prevent it from being interpretted as html.