Eigenes Plugin erstellen oder Code anpassen?? Spaw-editor
Posted: Wed Mar 07, 2007 12:13 pm
Hallo,
ich habe mich entschlossen, dass ich den SPAW-Editor http://www.solmetra.com/en/disp.php/en_ ... spaw_intro gerne für mein privates kleines Tagebuch verwenden will. Der reicht mir vom Umfang her aus. Jedoch gibt es dafür noch kein Plugin für Serendipity.
Nun bin ich am überlegen, ob ein eigenes Plugin sinnvoll ist. (Dazu brauche ich aber etwas Hilfe) oder ob ich lieber den Code von Serendipity anpassen soll.
Folgendes muss laut Spaw-Dokumentation gemacht werden:
To use SPAW Editor in it's simpliest form you need to add only 3 lines of code to your scripts.
1. First you include SPAW's main include file like this:
include("spaw2/spaw.inc.php");
2. Then you create an instance of SpawEditor object
$spaw = new SpawEditor("spaw1", $content);
where "spaw1" is the name of SPAW editor's instance (and it's first page, more on pages later) and $content variable holds initial editor content
3. And then you replace your textarea with a call to SPAW's show() method (or getHtml() if you want to get SPAW's code in a variable for later use)
$spaw->show();
IMPORTANT: Don't forget to place a call to show() method inside your HTML form. You should also use POST as method attribute of your form.
When your form is submited you can get edited content by reading $_POST['spaw1'] (or $HTTP_POST_VARS['spaw1'] in older PHP4 versions)
Was meint Ihr?
Wie sollte ich vorgehen, welche Dateien müsste ich anpassen, wenn ich die Eingabe-Textarea anpassen will? (Macht das überhaupt Sinn)?
Ich möchte den Spaw-Editor gerne verwenden, weil ich da bereits persönliche Modifizierungen vorgenommen habe, die ich gerne nutzen möchte.
viele Grüße
Ayko
ich habe mich entschlossen, dass ich den SPAW-Editor http://www.solmetra.com/en/disp.php/en_ ... spaw_intro gerne für mein privates kleines Tagebuch verwenden will. Der reicht mir vom Umfang her aus. Jedoch gibt es dafür noch kein Plugin für Serendipity.
Nun bin ich am überlegen, ob ein eigenes Plugin sinnvoll ist. (Dazu brauche ich aber etwas Hilfe) oder ob ich lieber den Code von Serendipity anpassen soll.
Folgendes muss laut Spaw-Dokumentation gemacht werden:
To use SPAW Editor in it's simpliest form you need to add only 3 lines of code to your scripts.
1. First you include SPAW's main include file like this:
include("spaw2/spaw.inc.php");
2. Then you create an instance of SpawEditor object
$spaw = new SpawEditor("spaw1", $content);
where "spaw1" is the name of SPAW editor's instance (and it's first page, more on pages later) and $content variable holds initial editor content
3. And then you replace your textarea with a call to SPAW's show() method (or getHtml() if you want to get SPAW's code in a variable for later use)
$spaw->show();
IMPORTANT: Don't forget to place a call to show() method inside your HTML form. You should also use POST as method attribute of your form.
When your form is submited you can get edited content by reading $_POST['spaw1'] (or $HTTP_POST_VARS['spaw1'] in older PHP4 versions)
Was meint Ihr?
Wie sollte ich vorgehen, welche Dateien müsste ich anpassen, wenn ich die Eingabe-Textarea anpassen will? (Macht das überhaupt Sinn)?
Ich möchte den Spaw-Editor gerne verwenden, weil ich da bereits persönliche Modifizierungen vorgenommen habe, die ich gerne nutzen möchte.
viele Grüße
Ayko