8 users online. Create an account or sign in to join them.Users
Extending delegates with extensions question
This is an open discussion with 24 replies, filed under General.
Search
The textformattermanager is used to invoke a formatter in PHP and give it an unformatted string, which the formatter will then process and return the formatted string. It doesn't do anything in terms of loading scripts and styles for you. Extensions typically include scripts and styles with that delegate and then progressively enhance desired fields through javascript. The Markitup extension is one that does this. (sorry on my phone so no links) From what I can gather you're trying to add a wysiwyg to the page editor page, format the input and store it in a new table linked via the page_id. On the frontend you're then making that input available by a parameter?
Yes correct. Param prob not the best approach here.. it's an experiment. But Wysywig in page editor is correct as well.
Wahoo! it's all working tickety boo now!
Just some cleaning up to do on the textformatter stuff.
Hey ho,
Just testing it out with 2.3beta2 and came up against the lack of access to $context['parent']->Page;
What should I be using in 2.3 instead?
Symphony::Engine()->Page;
Cheers.
Create an account or sign in to comment.
Thanks Brendo,
I've already got that working for ckeditor in a hardcoded way using addScriptToHead and addStyleSheetToHead.
But was thinking in my head that it was possible to do it conditionally based on the text-formatter class appended to the textarea node.
I was under the impression that's what the textformatter manager was doing, but I may be completely wrong now :)
What conventions are others using to append scripts to head depending on text-formatter/WYSIWYG selected in a preferences setting.. taking Documenter as an example of this I guess.
For now I'm just thinking some conditional if for installed and preference selected type of approach in the addScriptToHead function, but sure there's a slicker approach unknown to little old me yet.
Thanks again.