GWT TinyMCE拼写检查 - php

我正在尝试使用TinyMCE和拼写检查来启动和运行GWT应用程序。我想对不正确拼写的单词进行行内突出显示,并希望有一个按钮来进行拼写检查。我尝试过iespell和拼写检查器,但效果不佳。到目前为止,这是我已经执行的步骤
1.使用Eclipse Indigo下载最新的GWT
2.下载了GWT TinyMCE插件http://code.google.com/p/tinymce-gwt/wiki/Tutorial
3.下载最新的TinyMCE
4.下载了最新的SpellChecker http://www.tinymce.com/wiki.php/Plugin:spellchecker
5.将我在步骤2中下载的jar目录中的tiny_mce_editor目录替换为步骤3。
6.用我在步骤4中下载的目录替换了tiny_mce_editor \ plugins \ spellchecker目录。
7.为GWT生成了以下代码。

package com.test.reporting.client;

import gr.open.client.TinyMCE;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.VerticalPanel;

/**
 * Entry point classes define <code>onModuleLoad()</code>.
 */
public class Reporting implements EntryPoint {
private TinyMCE tinyMCEEditor = new TinyMCE();

private final VerticalPanel verticalPanel = new VerticalPanel();
/**
 * This is the entry point method.
 */
public void onModuleLoad() {

    // Add the nameField and sendButton to the RootPanel
    // Use RootPanel.get() to get the entire body element
    RootPanel rootPanel = RootPanel.get();
    String[] plugins = tinyMCEEditor.getConfig().getPlugins().split(", ");
    String[] newPlugins = new String[plugins.length+1];
    System.arraycopy(plugins, 0, newPlugins, 0, plugins.length);
    newPlugins[plugins.length] = "spellchecker"; 

    tinyMCEEditor.getConfig().setPlugins(newPlugins);
    tinyMCEEditor.getConfig().setThemeAdvancedButtons3(new String[]{"spellchecker","iespell"});

    rootPanel.add(verticalPanel, 0, 0);
    verticalPanel.add(tinyMCEEditor);
}
}

现在,当我在Chrome或Firefox中使用此功能时,内联拼写不起作用,并且拼写检查图标给出了一个非常长的错误,此错误在此问题的结尾处出现。在Internet Explorer中,出现iespell图标,但除了要求安装iespell之外没有执行任何其他操作。但是,当我改变

tinyMCEEditor.getConfig().setThemeAdvancedButtons3(new String[]{"spellchecker","iespell"});

tinyMCEEditor.getConfig().setThemeAdvancedButtons3(new String[]{"iespell"});

现在,在Chrome和Firefox中,都可以使用内联拼写检查,但是与TinyMCE相关的整个工具栏都消失了。

谁能帮我解决我的两个问题?

谢谢

长PHP错误
错误响应:?php
/ ** * $ Id:rpc.php 915 2008-09-03 08:45:28Z spocke $ * * @package MCManager.includes * @author Moxiecode * @copyright版权所有©2004-2007,Moxiecode Systems AB,保留所有权利。 * / require_once(“ ./ includes / general.php”); //设置RPC响应标头header('Content-Type:text / plain'); header('Content-Encoding:UTF-8'); header(“ Expires:Mon,26 Jul 1997 05:00:00 GMT”); header(“ Last-Modified:”。gmdate(“ D,d M Y H:i:s”)。“ GMT”);标头(“缓存控制:不存储,不缓存,必须重新验证”); header(“ Cache-Control:post-check = 0,pre-check = 0”,false); header(“ Pragma:no-cache”); $ raw =“”; //尝试参数if(isset($ _ POST [“ json_data”]))$ raw = getRequestParam(“ json_data”); //如果(($$ raw && isset($ _ GLOBALS)&& isset($ _ GLOBALS [“ HTTP_RAW_POST_DATA”]))),尝试使用globals数组。 //如果(($ raw && isset($ HTTP_RAW_POST_DATA))$ raw = $ HTTP_RAW_POST_DATA; //尝试串流if(!$ raw){if(!function_exists('file_get_contents')){$ fp = fopen(“ php:// input”,“ r”);如果($ fp){$ raw =“”; while(!feof($ fp))$ raw = fread($ fp,1024); fclose($ fp); }} else $ raw =“”。 file_get_contents(“ php:// input”); } //如果(!$ raw)die('{“ result”:null,“ id”:null,“ error”:{“ errstr”:“无法获取原始发布数据。”,“ errfile” :“”,“ errline”:null,“ errcontext”:“”,“ level”:“ FATAL”}}''); //如果(isset($ config ['general.remote_rpc_url'])){$ url = parse_url($ config ['general.remote_rpc_url']); //设置请求$ req =“ POST”。 $ url [“ path”]。 “ HTTP / 1.0 \ r \ n”; $ req。=“连接:close \ r \ n”; $ req。=“主机:”。 $ url ['host']。 “ \ r \ n”; $ req。=““内容长度:”。 strlen($ raw)。 “ \ r \ n”; $ req。=“” \ r \ n“。 $ raw; if(!isset($ url ['port'])||!$ url ['port'])$ url ['port'] = 80; $ errno = $ errstr =“”; $ socket = fsockopen($ url ['host'],intval($ url ['port']),$ errno,$ errstr,30); if($ socket){//发送请求头文件fputs($ socket,$ req); //读取响应头和数据$ resp =“”; while(!feof($ socket))$ resp。= fgets($ socket,4096);复制代码fclose($ socket); //分割响应标头/数据$ resp = explode(“ \ r \ n \ r \ n”,$ resp); echo $ resp [1]; //输出主体} die(); } //获取JSON数据$ json = new Moxiecode_JSON(); $ input = $ json-> decode($ raw); //执行RPC if(isset($ config ['general.engine'])){$ spellchecker = new $ config'general.engine'; $ result = call_user_func_array(array($ spellchecker,$ input ['method']),$ input ['params']); } else die('{“ result”:null,“ id”:null,“ error”:{“ errstr”:“您必须在config.php文件中选择一个拼写检查器引擎。”,“ errfile”:“”, “ errline”:null,“ errcontext”:“”,“ level”:“ FATAL”}}')); //请求和响应ID应当始终相同$ output = array(“ id” => $ input-> id,“ result” => $ result,“ error” => null); //返回JSON编码的字符串echo $ json-> encode($ output); ?>

编辑:
我已经弄清楚了如何获取浏览器的拼写检查。您只需要包含gecko_spellcheck元素。但是我仍然迷失了如何使TinyMCE拼写检查器正常工作。

参考方案

您需要设置一个tinymce init参数,以便在tinymces iframe框中激活壁虎拼写检查器引擎。您需要在init中这样设置

// This option enables you toggling the internal Gecko/Firefox spellchecker logic. 
// This option is set to false by default and will then remove the spellchecker from TinyMCE. 
gecko_spellcheck: true,

PHP-将日期插入日期时间字段 - php

我已在数据库中使用datetime字段存储日期,使用PHP将“今天的日期”插入该字段的正确方法是什么?干杯, 参考方案 我认为您可以使用php date()函数

php ziparchive类源代码 - php

Improve this question 我如何获取ziparchive类本身的源代码。 参考方案 假设您在谈论PHP ZipArchive class:下载PHP source code并查找适当的文件。如果您希望源代码是PHP代码,您可能会感到失望,因为源代码是用C语言编写的。或者,也可以在PHP Github Development Reposito…

PHP-MySQL结果转换为JSON - php

我试图了解如何将MySQL结果转换为JSON格式,以便以后可以在Javascript中使用此JSON来构建HTML表。但是我的代码只是产生大量的空值,我还不明白为什么。$result = mysqli_query($con, "SELECT * FROM Customers"); $test = json_encode($result);…

PHP Count数组元素 - php

嗨,有人可以解释为什么这会返回“数组由0个元素组成”。 :$arr = array(1,3,5); $count = count($arr); if ($count = 0) { echo "An array is empty."; } else { echo "An array has $count elements.…

PHP:从函数返回值并直接回显它? - php

这可能是一个愚蠢的问题,但是……的PHPfunction get_info() { $something = "test"; return $something; } html<div class="test"><?php echo get_info(); ?></div> 有没有办…