Prepopulate Summernote editor

I’m trying to use the Summernote wysiwyg editor to replace a textarea in a page add/edit layout. The original code generated by radsystems 7.1.2 is:

<textarea placeholder="Enter Content" id="ctrl-content"  required="" rows="5" name="content" class=" form-control"><?php echo get_value('content') ?></textarea>

So in edit mode, the original content (to be edited) is displayed by the php echo statement. When I replace the textarea with the summernote editor, my code is thus:

<textarea id="ctrl-content" class="summernote" name="content" required="" rows="5"><?php echo get_value('content') ?></textarea>

And this works… I get a nice editor instead of the plain textarea box. That’s fine in Add mode, but the pre-populated content doesn’t show up for editing, it’s just blank.

Can someone help with a solution?

I’m open to using other editors, I think the solution would apply to any of them.

Radsystems Studio has option to use wysiwyg editor for textarea, set use html editor to True in Textarea of the add page field properties.

Thanks @willvin this is awesome, even takes care of image uploads!