[英]sceditor: How do I save and load data to/from mysql
I recently came across this BBCode (Bulletin Board Code) editor named SCEditor . 最近,我遇到了一个名为SCEditor的 BBCode (公告板代码)编辑器。 It's the first one that I found so I started using this one, but i am not really familiar with parsers and stuff. 这是我发现的第一个,因此我开始使用它,但是我对解析器和其他东西并不真正熟悉。 I need it for showing news on my website. 我需要它来在我的网站上显示新闻。 So basically: 所以基本上:
Here's the simple code i am using: 这是我正在使用的简单代码:
<form action="add-news.php" method="post">
<input
type="text"
name="newssubject"
placeholder="Subject"
required="required field"
class="form-control" style="width: 98%">
</input> <br>
<textarea
id="newsenter"
cols="110"
rows="20"
name="newsbody">
</textarea><br>
<button
style="float:right; margin-right: 10px;"
type="submit"
name="newsset"
class="btn btn-success">
Post
</button>
<a href="mod.php">
<button
type="reset"
style="float:right; margin-right: 10px;"
class="btn btn-danger">
Cancel
</button>
</a>
</form>
<script>
var textarea = document.getElementById('newsenter');
sceditor.create(textarea, {
format: 'bbcode',
style: 'minified/themes/content/default.min.css'
});
</script>
You can use SBBCodeParser . 您可以使用SBBCodeParser 。 SCEditor and this class were coded by the same person. SCEditor和此类由同一个人编码。 So it would be more compatible. 因此它将更加兼容。
from this answer : https://stackoverflow.com/a/17900286/5902691 从这个答案: https : //stackoverflow.com/a/17900286/5902691
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.