WYSIWYG editor in IE

I'm using the build-in functions of IE for an online WYSIWYG editor. However, I don't know how to justify images so that tekst wraps around it. I included some pieces of code below. Can this be done?



_______________________________________________


function makeImage(){

sImage = "cms/images/" + document.all.ImageSource.value;
doFormat('InsertImage',sImage);
}

function doFormat(what) {

var eb = document.all.editbar;

if(what == "FontName"){
if(arguments[1] != 1){
eb._editor.execCommand(what, arguments[1]);
document.all.font.selectedIndex = 0;
}
} else if(what == "FontSize"){
if(arguments[1] != 1){
eb._editor.execCommand(what, arguments[1]);
document.all.size.selectedIndex = 0;
}
} else {
eb._editor.execCommand(what, arguments[1]);
}
}

Comments

  • : I'm using the build-in functions of IE for an online WYSIWYG editor. However, I don't know how to justify images so that tekst wraps around it. I included some pieces of code below. Can this be done?
    :
    :
    :
    : _______________________________________________
    :
    :
    : function makeImage(){
    :
    : sImage = "cms/images/" + document.all.ImageSource.value;
    : doFormat('InsertImage',sImage);
    : }
    :
    : function doFormat(what) {
    :
    : var eb = document.all.editbar;
    :
    : if(what == "FontName"){
    : if(arguments[1] != 1){
    : eb._editor.execCommand(what, arguments[1]);
    : document.all.font.selectedIndex = 0;
    : }
    : } else if(what == "FontSize"){
    : if(arguments[1] != 1){
    : eb._editor.execCommand(what, arguments[1]);
    : document.all.size.selectedIndex = 0;
    : }
    : } else {
    : eb._editor.execCommand(what, arguments[1]);
    : }
    : }
    :

    Ehm ... I have no idea, but here is how it's done in plane old HTML
    image


    This text, provided it's long enough, should be right of the image and wrap around it nicely if it gets below the image.

  • Well, that could be simplified in

    image

    But that's *not* what I mean, I want to do it using scripting for my WYSIWYG editor.

    : : I'm using the build-in functions of IE for an online WYSIWYG editor. However, I don't know how to justify images so that tekst wraps around it. I included some pieces of code below. Can this be done?
    : :
    : :
    : :
    : : _______________________________________________
    : :
    : :
    : : function makeImage(){
    : :
    : : sImage = "cms/images/" + document.all.ImageSource.value;
    : : doFormat('InsertImage',sImage);
    : : }
    : :
    : : function doFormat(what) {
    : :
    : : var eb = document.all.editbar;
    : :
    : : if(what == "FontName"){
    : : if(arguments[1] != 1){
    : : eb._editor.execCommand(what, arguments[1]);
    : : document.all.font.selectedIndex = 0;
    : : }
    : : } else if(what == "FontSize"){
    : : if(arguments[1] != 1){
    : : eb._editor.execCommand(what, arguments[1]);
    : : document.all.size.selectedIndex = 0;
    : : }
    : : } else {
    : : eb._editor.execCommand(what, arguments[1]);
    : : }
    : : }
    : :
    :
    : Ehm ... I have no idea, but here is how it's done in plane old HTML
    :
    :
    image
    :


    : This text, provided it's long enough, should be right of the image and wrap around it nicely if it gets below the image.
    :

    :

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion