0

我已经厌倦了在Invision Power Board (IPB) 中处理CKEditor,我想使用另一个编辑器。

我已经在 Greasemonkey 脚本中准备好了另一个编辑器。现在的问题是我不知道如何阻止 CKEditor 加载或在加载后将其关闭,以便我的编辑器可以在其位置执行。

如何“关闭”CKEditor?

对于需要的人:

这是一个使用 CKEditor 的 IPB 论坛。不过,它需要注册。

这是一个演示论坛,但目前处于离线状态。

4

1 回答 1

2

在 IPB 的较新版本(不是早期的免费版本)上,如果您阻止 CKEditor javascript 的加载,IPB 将为您提供一个纯文本<textarea>

在 Firefox+Greasemonkey 中,您可以使用出色的checkForBadJavascripts实用程序来阻止 CKEditor javascript 。像这样:

// ==UserScript==
// @name        _Block CKEditor on the selected site(s)
// @include     http://YOUR_SERVER.COM/YOUR_PATH/*
// @require     https://gist.github.com/raw/2620135/checkForBadJavascripts.js
// @run-at      document-start
// @grant       GM_addStyle
// ==/UserScript==
/*- The @grant directive is needed to work around a design change
    introduced in GM 1.0.   It restores the sandbox.
*/

checkForBadJavascripts ( [
    [true,  /ckeditor/i,  null ]
] );


当你这样做时,IPB 会为你提供一个<textarea>with class ipsEditor_textarea例如:

<textarea class="ipsEditor_textarea input_text" name="Post" id="editor_50b6f145efdd7">
</textarea>


然后,您可以将您的编辑器附加到它。

于 2012-11-29T05:45:54.380 回答