Bernhard Vallant
Bernhard Vallant

Reputation: 50786

WYSIWYG editor for non-editable embeddable objects

I'm looking for a js WYSIWYG editor that lets me insert readymade content that should be non-editable via the editor's interface, but via a link on it and some custom user interface. Users should be able to add objects to the content that are too complex to be handled by the editor by default and that are finally rendered when the page is displayed.

Looking around I found some TinyMCE plugins, non-editable content and atomic sections, which both point in the right direction but don't look too promising to me. For that I'd like to know if anybody out there has experiences with implementing some functionality like this or can point me to an editor that is probably more suitable for that than TinyMCE?

Upvotes: 1

Views: 572

Answers (2)

Thariama
Thariama

Reputation: 50832

I think you should stick with Tinymce. Actually all real time editors for browsers use an iframe in which the text gets put due to styling issues i guess. So using another editor won't solve the iframe problem MK_Dev described.

Upvotes: 0

MK_Dev
MK_Dev

Reputation: 3333

I implemented something similar using YUI Rich Text Editor. Considering my requirements, dealing with non-editable elements inside an iFrame was a hassle. What I ended up doing is this: whenever the user inserts a custom item using the toolbar (in my case it was a custom gallery with embeddable videos, etc.), I'd "split" the content of the editor at the cursor and insert a gallery "between" the editors. You end up with 2 actual editors and a gallery:

It required a bit of work to manage and render all of the objects and it had its downsides. But with proper CSS and some JS it could be made to look like and work like it's part of the editor.

Upvotes: 2

Related Questions