我的网站上有一个HTML tryit编辑器(例如w3schools编辑器),我的语言是波斯语(波斯语)。当我要测试此编辑器时,如果在单击“运行”后将波斯语@font-face
字体添加到任何元素,则在tryit编辑器的结果窗口中,它将不起作用并且该元素的文本不起作用更改...。(我在headit元素的tryit编辑器主页中加载了@font-face
字体)有人可以帮助我吗?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>تمرین استایل رنگ متن</title>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="lib/bootstrap.min.css">
<link href="css/main.css" rel="stylesheet">
<link rel="stylesheet" href="mini_fonts/farsi_fonts.css">
<script src="js/1.12.4/jquery.min.js"></script>
<script src="js/1.12.4/jquery-ui.js"></script>
<link rel=stylesheet href=lib/codemirror.css>
<script src=lib/codemirror.js></script>
<script src=lib/xml.js></script>
<script src=lib/javascript.js></script>
<script src=lib/css.js></script>
<script src=lib/closetag.js></script>
<script src=js/custom.js></script>
<style type="text/css">
.CodeMirror {
height: auto;
}
</style>
</head>
<body>
<div class="panel-primary header">
<div class="panel-heading">
<h3 class="panel-title">
<button id="runButton" type="button" class="btn btn-default" onclick="submitTryit()">Run</button>
</h3>
</div>
</div>
<div id="mainContent" class="mainContent">
<div id="mainContentHolder">
<div id="draggable"></div>
<div class="main-left">
<div class="left-inner-content">
<div class="left-inner-main">
<textarea id=editor name=editor>
<!DOCTYPE html>
<html>
<body>
<h1 style="font-family:verdana;">This is a heading</h1>
<p style="font-family:courier;">This is a paragraph.</p>
<p style="font-family:BMorvarid;">محمدرضا 1234</p>
</body>
</html>
</textarea>
</div>
</div>
</div>
<div class="main-right">
<div class="right-inner-content">
<div class="right-inner-main">
<div id="iframewrapper"></div>
</div>
</div>
</div>
</div>
</div>
<script>
// Initialize CodeMirror editor with a nice html5 canvas demo.
var editor = CodeMirror.fromTextArea(document.getElementById('editor'), {
mode: 'text/html',
autoCloseTags: true
});
submitTryit();
</script>
</body>
</html>