Ich möchte JQuery verwenden, um die ID aus einem Hyperlink zu holen. < /p>
Stellen Sie dann den Inhalt eines Redactor textArea
fest
Hier ist mein jQuery
$(document).ready(function()
{
var buttons = ['formatting', '|', 'bold', 'italic', 'fullscreen', '|', 'button1'];
$('#redactor_content').redactor({
focus: true,
buttons: buttons
});
$('a.aDirectReply').on("click",function(e){
var username = $(this).attr("id");
$('#redactor_content').redactor('set', '@' + username); // doesn't work
....
< /code>
Ich habe alles ausprobiert, was ich auf Stackoverflow finden kann, einschließlich folgender:
TextArea -Editor Redactor. Einfügen Wert mit JQuery
, aber bisher hat nichts funktioniert.let app = Redactor('#entry');
// insert content from outside scripts
app.editor.insertContent({ html: '
Hello world!
' });
// insert content in the plugin method
this.app.editor.insertContent({ html: '
Hello world!
' });
< /code>
Aber alle ihre Beispiele führen zum Fehler "Redactor ist nicht definiert" < /p>
Es ist an diesem Punkt über meinem Kopf. Hilfe geschätzt!
[url=viewtopic.php?t=14917]Ich möchte[/url] JQuery verwenden, um die ID aus einem Hyperlink zu holen. < /p>
[code]Respond to user1234[/code]
Stellen Sie dann den Inhalt eines Redactor textArea
fest[code][/code]
Hier ist mein jQuery
$(document).ready(function()
{
var buttons = ['formatting', '|', 'bold', 'italic', 'fullscreen', '|', 'button1'];
$('#redactor_content').redactor({
focus: true,
buttons: buttons
});
$('a.aDirectReply').on("click",function(e){
var username = $(this).attr("id");
$('#redactor_content').redactor('set', '@' + username); // doesn't work
....
< /code>
Ich habe alles ausprobiert, was ich auf Stackoverflow finden kann, einschließlich folgender:
TextArea -Editor Redactor. Einfügen Wert mit JQuery
, aber bisher hat nichts funktioniert.let app = Redactor('#entry');
// insert content from outside scripts
app.editor.insertContent({ html: '
Hello world!
' });
// insert content in the plugin method
this.app.editor.insertContent({ html: '
Hello world!
' });
< /code>
Aber alle ihre Beispiele führen zum Fehler "Redactor ist nicht definiert" < /p>
Es ist an diesem Punkt über meinem Kopf. Hilfe geschätzt!