float image execCommand()

Par remy76690, il y a 10 ans


Bonjour,

voilà, je voudrais faire en sorte que je puisse mettre une image en float dans une contenteditable.

$('.RTE a[title="FLOAT Left"]').click(function(){ var $this_RTE = $(this); var iframe = $this_RTE.parents(".RTE").find("iframe").show(); iframe[0].contentWindow.focus(); iframe[0].contentWindow.document.execCommand('insertHTML', false, "<span style='display: block; float: left;'>"+FUNCTION+"</span>"); return true; });

Le problème avec ce code c'est que je perd l'image, j'ai une fonction pour le texte mais elle n'agit pas sur l'image.
Si quelqu'un à une solution ;)

Merci de votre aide.

Aucune réponse