You are not logged in.
I have searched through the topics, and I guess my search skills are not up to par ....
I have found the plugin InsertWords which allows the user to select from a human readable list, and coded text is placed at the cursor.
However i want to be able to have the user select some text, choose from a droplist, and the selected text is surrounded by a custom <div>.
For instance:
['Searchable','<div id="css_search" myAction="search">'],
['Sounds Like','<div id="css_soundex" myAction="soundex">']
The user types in:
This is a test
The user selects the word test, and chooses 'Searchable' from the drop list. The HTML result is:
This is a <div id="css_search" myAction="search">test</div>
I can then parse the text for a <div> which has the non-standard parameter myAction, and do something with it.
Anything like this?
Offline
Ok, the closest I can come to making this work, is to create a custom formatblock:
xinha_config.formatblock={
'—':'',
'Span 1':'span myAction=\"ACT1\"',
'Span 2':'span myAction=\"ACT2\"',
};
Which does not quite work, as the formatblock code uses the entire "span myAction"ACT1" for the closing tag, plus it blocks the entire line, not just the selection. The word test was selected, then Span 1 from the drop list:
<<span myAction="ACT1">>This is a test</<span myAction"ACT1">>
I could use a bogus tag, then parse it out to the actual span tags, but I cannot get around the entire line selection.
So close, yet so far....
Last edited by Random Bits (2005-10-25 19:00:36)
Offline