Language span tags

Hi,

We’re wanting to give users the ability to mark up text as another language when entering in EditLive! we would like it be applied to just the text a user selects like this:

<p>here’s some text that we want marked as<span lang=“de” xml:lang=“de”>deutsch</span> then back to normal language</p>

but rather than wraping just the text selected, the span tags are added to the paragraph tags like this:

<p><span lang=“de” xml:lang=“de”>here’s some text that we want marked as deutsch then back to normal language</span></p>

We’ve added it to the standard style drop down is this the best place? or should we create a new button and create some javascript to achieve what we are trying to?

many thanks,
Alyssa

Sonal,

It seems to me that this is just preference: do your users want to see the language control as part of the dropdown or do they want a separate button? Either one will work.

I don’t think that there’s any particular maintenance issue: as soon as you have a custom Ephox configuration, it doesn’t matter how large or small the changes are.

Dave

Hi Dave,

The ideal solution would be to let the users add the language span tags using the style drop down as they do now but making it work correctly. At the moment it’s not applying the tags to just the selected text. Do you know how to get this to work correctly?

thanks,
Alyssa

Alyssa,

Of the top of my head, I do not know how to do this. I’m sure it can be done (it’s just JavaScript, after all), but actually doing it will take some research.

I’ll ask around and let you know if anybody has a quick answer.

Dave