You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice if shortcodes could have a representation that indicates which instance they are.
Add a repr option to shortcodes that takes an unformatted string. E.g.:
#!python
@shortcodes.button(repr='A person named {entity}.')
Add a data-repr attribute to insert_shortcodes.js. The value should be the repr string after passing the instance as the "context" to str.format.
Add a data-repr attribute to shortcodes.The problem with this is keeping the instance repr's synchronized with the shortcode parameter. In my initial idea it is hardcoded at instance definition, which I would consider unacceptable.
Add a view to get the instance -> repr mapping. This will look a lot like render.py.
In plugin.js's render:
In init callback, call a view to get instance -> repr mapping.
Pass instance repr into render.
In render, Insert repr rather than displayname if defined.
The text was updated successfully, but these errors were encountered:
The less happening in the tinymce plugin the better because it's hard to
read, potentially fragile when upgrading tinymce, and not portable to
other content editors.
This also will make custom instance representations (#5) easier to
implement.
It would be nice if shortcodes could have a representation that indicates which instance they are.
repr
option to shortcodes that takes an unformatted string. E.g.:data-repr
attribute toinsert_shortcodes.js
. The value should be therepr
string after passing the instance as the "context" tostr.format
.Add aThe problem with this is keeping the instance repr's synchronized with the shortcode parameter. In my initial idea it is hardcoded at instance definition, which I would consider unacceptable.data-repr
attribute to shortcodes.render.py
.plugin.js
'srender
:init
callback, call a view to get instance -> repr mapping.render
.render
, Insertrepr
rather thandisplayname
if defined.The text was updated successfully, but these errors were encountered: