09/10/2018, 23:14
freetoolbox->design News
mình muốn viết một trang website là trang tin. vì vậy mình viết trong phần admin để đăng tin làm thế nào để có thể nhúng được công cụ toolbox. cho phép người soạn tin có thể tạo bản tin theo ý mình(văn bản + hình ảnh) và import lên csdl(php & mysql).
bạn nào đã làm ròi chỉ cho mình với . và bạn đang sử dụng công cụ toolbox nào thì có thể cho mình một cái link để download nhé.
thanhks!
bạn nào đã làm ròi chỉ cho mình với . và bạn đang sử dụng công cụ toolbox nào thì có thể cho mình một cái link để download nhé.
thanhks!
Bài liên quan
http://cdcn.biz/index.html/tiny_mce.rar
Save đoạn code dưới đây vào một file .php rồi include nó vào file bạn muốn bộ soạn thảo hiển thị trên các textarea.
<?php
$edtcss = "editor_css : \"Duong_dan_cua_ban/tiny_mce/themes/default/editor_ui.css\",";
echo "<!-- tinyMCE -->
<script language=\"javascript\" type=\"text/javascript\" src=\"includes/tiny_mce/tiny_mce.js\"></script>
<script language=\"javascript\" type=\"text/javascript\">
tinyMCE.init({
mode : \"textareas\",
theme : \"advanced\",
language : \"vietnamese\",
force_p_newlines: \"false\",
force_br_newlines: \"true\",
plugins : \"table,advhr,advimage,advlink,emotions,iespell,in sertdatetime,preview,zoom,flash,searchreplace,prin t\",
theme_advanced_buttons1_add : \"fontselect,fontsizeselect\",
theme_advanced_buttons2_add : \"separator,insertdate,inserttime,preview,zoom,sep arator,forecolor,backcolor\",
theme_advanced_buttons2_add_before: \"cut,copy,paste,separator,search,replace,separato r\",
theme_advanced_buttons3_add_before : \"tablecontrols,separator\",
theme_advanced_buttons3_add : \"emotions,iespell,flash,advhr,separator,print\ ",
theme_advanced_toolbar_location : \"top\",
theme_advanced_toolbar_align : \"left\",
theme_advanced_path_location : \"bottom\",
$edtcss
plugin_insertdate_dateFormat : \"%Y-%m-%d\",
plugin_insertdate_timeFormat : \"%H:%M:%S\",
extended_valid_elements : \"a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|h eight|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]\",
external_link_list_url : \"example_link_list.js\",
external_image_list_url : \"example_image_list.js\",
flash_external_list_url : \"example_flash_list.js\",
file_browser_callback : \"fileBrowserCallBack\"
});
</script>
<!-- /tinyMCE -->";
?>
Chúc bạn thành công!
cung không thấy báo lỗi gì.
đường dẫn mình đặt dúng cả
vd:
mình có thư mục
Edit:
mình đặt thư mục tiny_mce và file ediit.php có nội dung như trên
và mình có file news.php có include("edit.php"); trên vào trong file News.php có thẻ <textarea> nhưng không thấy nó hiển thị. bạn có thể xem lại hộ mình không
thanks!
Thứ hai: bạn nhớ gõ đường dẫn chính xác cho đoạn:
<script language=\"javascript\" type=\"text/javascript\" src=\"includes/tiny_mce/tiny_mce.js\">
$edtcss = "editor_css : \"Duong_dan_cua_ban/tiny_mce/themes/default/editor_ui.css\",";
trong trường hợp của bạn là :
<script language=\"javascript\" type=\"text/javascript\" src=\"tiny_mce/tiny_mce.js\">
và
$edtcss = "editor_css : \"tiny_mce/themes/default/editor_ui.css\",";
thanhk you!