Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Display a custom tag within the TinyMce WYSIWYG view

Tags:

html

tinymce

I have a suite of custom tags in my application that abstract some of the common system tasks.

I am using TinyMCE as my HTML editor, and want to be able to render my custom tag as an image in the editor when in the WYSIWYG view. Similar to TinyMCE's built-in behaviour for SWF files.

Is there an easy way to do this in TinyMCE?

UPDATE:

It seems that custom tags barely work in TinyMCE at all. Some of the problem seems to be that face that my tags are namespaced:

<o:some_tag />

Which is causing all sorts of issues.

Is there a editor that supports this kind of functionality better?

like image 335
Toby Hede Avatar asked Nov 27 '25 08:11

Toby Hede


2 Answers

I found a method that meets my needs and turned out to be a little easier than constructing a plugin.

Full details here: How-To: Custom tags with TinyMCE.

like image 189
Toby Hede Avatar answered Nov 29 '25 20:11

Toby Hede


Unfortunately there is no easy way. Tinymce supports "extended_valid_elements" property . However as you want to render this custom tag as an image, all you can do is to create a custom plugin for your task

like image 21
Tinku Avatar answered Nov 29 '25 21:11

Tinku