4
Ich versuche, in ein bootstrap-wysihtml5-Editor-Objekt zuzugreifen. Ich tue dies auf diese Weise:Zugriff auf das bootstrap-wysihtml5-Editor-Objekt
$(document).ready(function() {
$('.someLink').live('click', function() {
var wysihtml5Editor = $('#textarea').wysihtml5().editor;
console.log('wysihtml5Editor: '+wysihtml5Editor);
wysihtml5Editor.composer.commands.exec("bold");
});
});
Chrome Konsole kehrt:
> wysihtml5Editor: undefined
> Uncaught TypeError: Cannot read property 'composer' of undefined
So ist der Punkt.
Welcher Art ist der Zugang zu einem wysihtml5-Objekt?
Der Punkt von allem ist, fügen Sie einige HTML-Code in meine Textarea.
danke sehr! – CROWD
Vielen Dank! Das hat mir auch geholfen. –