majorsilikon.blogg.se

Tinymce get plain text
Tinymce get plain text












tinymce get plain text

There's also Y.App which handles routing and transitions too. a spinner + message), select a section of the target content, change scroll, force a title change, maintain history, and a URL parameter to allow for different content return.

tinymce get plain text

It is also possible to use the events that pjax fires to add additional information to the page during loading (e.g. The Pjax userguide provides a fair amount of detail. This will define a new Pjax object listening to any link with the yui3-pjax class on it (this is a setting), and will apply the content it returns to the node identified by #content. JQuery('#'+target).load(url+'&isajax=true',function() )

#Tinymce get plain text code

Consider the following code (jQuery, but I'm sure you can YUIfy it): Link to content This would be a very nice feature to have in future Moodles, given that AJAX is more or less universally used these days.īTW, I have lately been using my own little trick I "invented", which I think would be a great addition to Moodle.

tinymce get plain text

Ok, I will look at this and come back if I find a solution. I guess I could create a new layout specificly for AJAX with empty headers and footers, and that would work, but then I'd probably include 30-40kb of JS with each AJAX call, which is far from ideal. So, my guess is that there is some sort of initialization code run in the footer that I cannot access. If I put the same code with header and footer everything works without a hitch. The same code is used to initialise the code and the AJAX call, the only difference is that I do not include a header, a footer and provide a layout in the AJAX call - instead I only print out the relevant HTML, which makes the code much faster. However, I only get a plain text textarea! When I click on the link "Add an answer", an AJAX call is made and is supposed to load a TinyMCE textarea under the link. I've created a function that creates a moodle editor instance, and it works beautifully.














Tinymce get plain text