大家好我正在为我的新社交网络建立一个博客系统,我正在使用TinyMCE写帖子!出于某种原因虽然它没有出现并且不知道为什么!
我已从他们的网站下载了该软件包,并将该内容上传到我的服务器,并创建了一个名为blog_writer.php的页面,其中包含以下内容:
这是包含我的文字区域的表格:
<form method="post" action="blog_writer.php">
<div id="blogMsg"><?php echo $msg; ?></div>
<div id="blogTitle">
Choose a topic:
<select name="topic">
<option value=" "> </option>
<?php
$sql = "SELECT id,name FROM blog_topics ORDER BY name";
$query = mysqli_query($db_conx, $sql) or die (mysqli_error());
while($row = mysqli_fetch_array($query)){
echo '<option value="' . $option[id] . '">' . $option[name] . '</option>';
}?>
</select>
Enter a title:
<input name="title" type="text" size="80" value="<?php echo $title; ?>" />
</div>
<div id="blogContent"><textarea name="blog" id="blog" cols="80" rows="25" class="tinymce"><?php echo $blog; ?></textarea>
<br/><br/>
<input type="submit" name="submit" id="submit" value="Publish Blog Post">
<br/><br/>
</div>
<div class="blogClear"></div>
</form>
这是我在页面上使用的javascript来引入文本编辑器并替换我的textarea:
<script src="js/javascript-1.9.1.js" type="text/javascript"></script>
<script src="tiny_mce/jquery.tinymce.js"></script>
<script>
$().ready(function() {
$('textarea.tinymce').tinymce({
script_url : 'tiny_mce/tiny_mce.js',
theme : "advanced",
plugins : "autolink,lists,inlinepopups,paste,noneeditable,nonebreaking",
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
});
});
</script>
据我所知,通过将我的页面与他们在下载中提供的示例页面进行比较,应该有一些显示uo的东西!但我现在得到的只是一个空白页面!
非常感谢先生们!
Phillip Dews
答案 0 :(得分:0)
您可以尝试将类添加到您的textarea并将其添加到您的tinymce配置
mode:'exact',
elements : "your_textarea_class",