[wp-trac] [WordPress Trac] #28195: Preview embeds with wpview and auto embed on paste
WordPress Trac
noreply at wordpress.org
Fri Jun 6 21:48:51 UTC 2014
#28195: Preview embeds with wpview and auto embed on paste
-------------------------+-------------------------
Reporter: avryl | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 4.0
Component: Media | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses: javascript
-------------------------+-------------------------
Comment (by azaozz):
Replying to [comment:38 avryl]:
> So ideally the interaction with TinyMCE's DOM should be done by the API.
A plugin shouldn't have to do this `this.node.insertBefore(
dom.createFragment( html ), this.node.lastChild );` to insert content
before the `ins` tag.
Yeah, couple of months ago we were discussing to have an "inner wrapper"
for views. Then all API elements (toolbar, clipboard, etc.) would go in
the view element and the actual view content will be in the inner wrapper.
This will make the API better and will prevent plugins from touching
needed tags like the "end mark".
That would look something like:
{{{
<div class="wpview-element" contenteditable="false" ...>
<div class="wpview-clipboard">...</div>
<div class="toolbar">...</div>
<div class="overlay">...</div> (if needed)
<div class="wpview-wrap">
[view content]
</div>
<ins data-wpview-end="1"></ins> (regex helper, can be <wbr data-wpview-
end="1" />)
</div>
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28195#comment:41>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list