-
- 121 Posts
I love xstandard but I don’t know how to integrate in modx.
Is there a tutorial how to integrate a new RTE in modx?
I could try to do something.
___________________________________________________________________
..:: Samuele ::..
-
- 121 Posts
I try using the guide
http://wiki.modxcms.com/index.php/API:RichText_Editor_Events
and
http://xstandard.com/page.asp?p=463B7CE3-B082-4984-AD84-4A1737959506
I create new plugin with this code
$e = &$modx->Event;
switch ($e->name) {
case "OnRichTextEditorRegister": // register the name
$e->output("XStandard");
break;
case "OnRichTextEditorInit": // Initialize the editor
if($editor == "XStandard") {
// The editor is active
$elementList = implode(",", $elements); // Comma-separated list of elements
//$html = "<!-- Add all the necessary code here -->";
$html = <<< CODE
<object type="application/x-xstandard" id="editor1" width="100%" height="400">
<param name="Value" value="Hello World!" />
</object>
CODE;
$e->output($html);
}
break;
}
but when I edit a page a System Alert message appear.
Anyone help me to make this plugin for xstandard?
___________________________________________________________________
..:: Samuele ::..
-
- 576 Posts
XStandard will most likely NOT work with the current version of MODx. The current method of adding RTEs to MODx require the RTE to be javascript or similar type so that the RTE can attach to a <textarea> tag.
The parse error you are getting is because your [tt]<<<CODE[/tt] block isn’t formatted correctly. the ending [tt]CODE;[/tt] cannot have any whitespace before it (it must be at the beginning of the line). However, as stated above, XStandard will not work with MODx as an alternative RTE.
EDIT: I forgot the most important word in the first sentence :-/ sorry...
-
- 121 Posts
ok, thanks
therefore there isn’t any hope to see modx and xstandard together?
___________________________________________________________________
..:: Samuele ::..