Postponed
Project:
Shortcode for Wysiwyg
Version:
7.x-2.x-dev
Component:
User interface
Priority:
Minor
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
5 Apr 2013 at 12:05 UTC
Updated:
10 Apr 2014 at 19:58 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
cbeier commentedThis feature is very tricky to implement. Also, in the WordPress the shortcodes are not rendered in the editor. The integration of that functionality in the media module is very special (insert generated html to the editor, extract the (media) html tags and convert it back to the media markup if the editor is detached, …). But with the flexibility that shortcodes can have, the convert process from editor html back to the shortcodes markup will be hard to act.
Comment #2
drupov commentedComment #3
mcfilms commentedJust so I am clear, at this point in time there is no Drupal equivalency to the WordPress shortcode function of adding the content of one post (or node, or generated block) to the middle of an HTML body.
That's not meant to be snarky, I am trying to assess if I can do what I want to do (relatively) easily.
Comment #4
hixster commented@mcfilms we built a whole bunch of shortcodes which do what you want - we may contrib if we get time.
Increasingly we use shortcodes for everything, forms, nodes, views rendering or list rendering.
The whole using blocks and regions to build sites is outdated now, customers want forms inside their content or a teaser here or there.
We settled on a generic content short code which takes arguments and looks a little like this:
[content type="node-type" ids="a list of ids" category="a list of term ids" viewmode="the display mode"]
We also have options for sticky, published, language, ignore permissions and that kind of thing.
I'll see if can contrib this stuff back at some point - it really opens up the flexibility of Drupal.
Lastly, and I hate to say it, but after 6 or so years of hardcore Drupal development Wordpress really is becoming a more attractive proposition, which short does being almost a standard with widespread support.
Comment #5
mcfilms commented@hixster -- I hear you. Two of the last three projects I have done were on WordPress. Quite frankly the out-of-the-box WordPress UI is better for content creators and now it seems to be getting better for devs.
Simply put, the use of shortcodes in WP is fantastic. Sure, I can emulate this in Drupal by writing custom page.tpl.php files, but, really? Adding a form or a block by typing in a reference in brackets is SO easy.
I really hope you can get around to contributing your work. I'd be very interested in testing and giving feedback and helping with documentation.
Cheers!
Comment #6
drupov commentedTotally agree with #4 and #5.
And yes, would be cool if we can contribute to and test your code!
Comment #7
jmuzz commentedHere's a patch that changes how shortcode_wysiwyg works to accomplish something like this. It isn't perfect, but here is what it will do:
Comment #8
denes.szabo commentedMoved to the shortcode_wysiwyg project.