CKEditor refresh after HTML insert [closed] - javascript

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed yesterday.
This post was edited and submitted for review yesterday and failed to reopen the post:
Original close reason(s) were not resolved
Improve this question
I changed the CKEditor Smiley plugin so that it inserts an image link between BBCODE tags with the insertHTML function, because the forum it is used on doesn't allow HTML tags. I want the new image to be displayed in the editor right away, not after I click on the source toggle button twice or I save the post.
Now, after insertHTML is called, the raw code between tags is displayed, for example [img]http://example.com/logo.gif[/img] I want the new image to be shown.
How do I refresh the content in the CKEditor right away after the insertHTML function is called?

Related

Replace HTML content between two tokens [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I have HTML content warped in between two tokens:
...<p>[ShowMore]This is <b>my</b> content.[/ShowMore]</p>...
I want to get this HTML between the two tokens and replace it with something more complex... using jQuery.
This solution will be used in CMS web site. The gole is to hide content form user and show it on click. Basically this HTML content will be replaced with a link witch will toggle (show/hide) HTML content on user click.
User can have multiple tokens on single site.
Did you mean replace [ShowMore]This is <b>my</b> content.[/ShowMore] by another text ?

customize choosing a tag feature [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
So I have an app user can create a tag, and choose a tag to post their stories. Everything works fine, but I want to change the way user choosing a tag to post stories. Right now, user has to scroll through the tag they want(more tags created, more scrolls user has to do)
What I'm trying to do is to display, some main tags I make to be inside box and user to be able click the tag that the tag to be chosen. It would be nice to make a search engine that user can type and the tag to be shown up that user can pick....but this seems too advanced for me now. (if you know how, please let me know)
the above is what I hope mine to be replaced to.
I'm not even sure which code I should touch to make this happen.
views.py?forms.py? or is this javascript?html file?
I think you are searching for Select2, there is a django package called django-select2

How do i automatically add the h1 of a page to an ahref link on that page [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
The site that i am working on has an 'Apply For This Job' button the a href on the button is as follows example.com/?Question12=insert%20job%20you%20are%20interested%20in
what we want is for example.com/?Question12=insert%20job%20you%20are%20interested%20in to be automatically be pulled in from the h1 on the page.
For example if the job page was for a Web Developer the h1 would be <h1> Web Developer </h1> and the link would automatically be /?Question12=web%developer
I'm sure this is easily done through javascript/jquery or php any help would be greatly apprecated.
Thanks in advance
We want a link on the page to automatically have what ever is written in a h1 tag at the top of the page added to the end of the link.
It can be achieved like this:
JSFIDDLE
HTML
<h1>Web Developer</h1>
job link
JQUERY
var link = $("a").attr("href");
link = link+$("h1").html();
link = link.replace(/\s/g,"%20");
$('a').attr("href", link);

How can I Insert data in database on link click event? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I want to insert a value in database when visitor click on a link.
For example:
Visitor comes on http://www.website.com/lp.php?id=broker
When he clicks on "Register now" I want to add the id value "broker" & the current time into database.
I need the javascript code to do that. I already tried all kind of scripts and I decided to ask here.
You can do this with jQuery Ajax and PHP or using HTML POST form.
http://api.jquery.com/jquery.post/
With jQuery:
$("#register_now_button_id").click(function(){
//AJAX CALL HERE
});

Replacing document with jquery [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
so what I'm trying to do is simple to explain: I have one page (let's call it login.html) that has a script whenever an $.get $.load $.post is called it shows an progress bar like youtube now my problem is to move to another page with one of this methods so for example I complete the login and it loads the page2.html and only shows the page2.html and leaves login.html after page2.html is ready to be displayed
Kind of like a preload, any ideas? I've tried the $('hmtl').load('page2.html'); but it messes up my CSS and SCRIPTS
You can try to use ajax loader which basically preloads the specified page and then just switches a body element of current and the preloaded page.
Here is an example

Categories

Resources