Detect HTML or TEXT mode for editor.

Created on 10 May 2013, about 11 years ago
Updated 1 November 2023, 8 months ago

I'm work on inserting images in 'tag' form into wysiwyg editor. I need detect editor status before insert - if editor is enabled in HTML mode i want insert tag ([[...]]) else, in TEXT mode i want insert HTML (<img src="".... />).

In JS wysiwyg plugin, in invoke function is there variable data.format with editor status. Is possible check current status of editor calling some function from wysiwyg JS API? Something like:

Drupal.wysiwyg.instances[Drupal.wysiwyg.activeId].status();

would be useful.

Thanks for advice.

πŸ’¬ Support request
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΈπŸ‡°Slovakia havran

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024