Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about insertObject #4

Open
chandrewz opened this issue Jun 9, 2014 · 3 comments
Open

Question about insertObject #4

chandrewz opened this issue Jun 9, 2014 · 3 comments

Comments

@chandrewz
Copy link

I noticed that you can call

$( '#RICH_TEXTAREA' ).rich_textarea( 'insertObject', '<span class="ui-button ui-state-default ui-widget ui-corner-all ui-button-text-only">'tag1'</span>' );

to insert tag-like text into the textarea. But, it's not an actual text object. I am a bit confused on how to insert a tag with a method call (without char triggering) and didn't find any documentation on this. Is this possible to do?

@chandrewz
Copy link
Author

Ah...got it within seconds after posting this question:

$( '#RICH_TEXTAREA' ).rich_textarea( 'insertObject', '<span class="ui-button ui-state-default ui-widget ui-corner-all ui-button-text-only">Tag1</span>', 'tag1' );

@chandrewz
Copy link
Author

Hi Yermo, if you get a chance to read this, is it possible to insert objects such as this?

$('#rich_textarea').rich_textarea('insertObject', '​​Visit Google​');

I am noticing that inserting normal text mixed with html-rich text has to be done separately. The above line only inserts 'Visit ' I have to call insertObject twice, on 'Visit ' and then a second time with 'Google'.

@Yermo
Copy link
Owner

Yermo commented Sep 10, 2014

Put it in a or

tag or similar.

-- Yermo

On 09/10/2014 11:56 AM, Andrew Chan wrote:

Hi Yermo, if you get a chance to read this, is it possible to insert
objects such as this?

$('#rich_textarea').rich_textarea('insertObject', '​​Visit Google
http://google.com​');

I am noticing that inserting normal text mixed with html-rich text has
to be done separately. The above line only inserts 'Visit ' I have to
call insertObject twice, on 'Visit ' and then a second time with 'Google
http://google.com'.


Reply to this email directly or view it on GitHub
#4 (comment).


Yermo Lamers Software Guy, Motorcyclist and Reluctant Writer

            http://miles-by-motorcycle.com

A social network for the lucky few who travel by motorcycle

and those who care about them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants