How to dynamically load wysiwygs fields upon the click of a button
Permalink
I am building a block that allows users to add "articles" to an email newsletter that is automatically sent out. I want each article body to have a wysiwyg editor to create it, also the user has to be able to create as many articles as he or she wishes. this is pretty straight forward when the article body is just some html that you load with javascript into a certain area of you block
as many times as the user wishes, but when looking at the markup this
generates, it looks like java scrip needs to be run to initialize this thing. now i could hack up the code that the <?php Loader::element("editor_controls"); ?> generates and get it to work, but i was wondering if there was a way that would be more forward compatible with changes to concrete. I just thought I would submit the question to you smart folks and see if you didn't have any insight or solutions. perhaps I just need to go about this from a completely different tack. I was looking at the jQuery .wysiwyg thing. Thanks for your thoughts.
<textarea></textarea>
as many times as the user wishes, but when looking at the markup this
<?php Loader::element("editor_controls"); ?>
generates, it looks like java scrip needs to be run to initialize this thing. now i could hack up the code that the <?php Loader::element("editor_controls"); ?> generates and get it to work, but i was wondering if there was a way that would be more forward compatible with changes to concrete. I just thought I would submit the question to you smart folks and see if you didn't have any insight or solutions. perhaps I just need to go about this from a completely different tack. I was looking at the jQuery .wysiwyg thing. Thanks for your thoughts.
The solution I came up with was to ditch the in built editor and tack on a jQuery wysiwyg editor. link:
https://github.com/akzhan/jwysiwyg...
I know this doesn't solve the original problem, but thats the solution I used after extensive fiddling with concrete-js calls.