I need to render my CKEditor Data on my web page but it's not happening as I am using vuejs, which does not refresh the page it just replaces the components.
My CKEditor data also contain MathML Formulas.
Need to load it dynamically from the rest API.
Example of data that is stored as the output of CKEditor
<p><math xmlns="http://www.w3.org/1998/Math/MathML"><msup><mrow><mo>(</mo><mi>a</mi><mo>+</mo><mi>b</mi><mo>)</mo></mrow><mn>2</mn></msup><mo>=</mo><msup><mi>a</mi><mrow><mn>2</mn></mrow></msup><mo>+</mo><mn>2</mn><mi>a</mi><mi>b</mi><mo>+</mo><msup><mi>b</mi><mn>2</mn></msup></math></p>
rendering MathML can be done using the CDN
https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML
but this thing works on page refresh and because VueJS is SPA it does not work there.
I want to render the formula in my , not in the CKEditor.
I have got the formula mentioned as an output of CKEditor but now want to display it on a normal webpage of vuejs
Related
I've got a component that downloads data from an API. When the user clicks Search, the content from the API is fetched via AJAX. This content from the API is in JSON and has got an ID of the product inside. I am able to create new HTML elements based on this content and put them inside my site, but I would like every created on the fly element to have routerLink="/detailsPage/itemID" working, so that after clicking it would route to detailsPage with apropriate ID. How to do it in the most simple way? I assume some recompiling of refreshing is needed.
The answer to this question is HTTPClient - Angular offers it as an easier way to use XMLHttpRequest (AJAX) in Angular applications, and using it also makes sure that routerLink or any other Angular directives will work on objects created dynamically with this method.
Angular - HTTPClient
I'm planning to modernize the photo gallery on my website. Currently I use the Colorbox plugin to open the large image and legend in a lightbox after clicking on a thumbnail. Google indexes the pictures and legends yet optimal.
My new photo gallery should be responsive and I want to show not only the photo and legend inside of the lightbox, but also further information like date, location, camera, tags, etc. That's why I will use the Ajax option rather than the standard gallery option of the lightbox plugin.
The thumbnails are compiled dynamically based on filtering and sorting settings and the information about the photos is stored in a database. So I will use a PHP script to get the necessary information and to set up the HTML code for the Ajax call dynamically. That should be no problem.
My question is: Will the contents that is loaded via Ajax in the Magnific Popup be indexed by Google?
Unfortunately I do not think so, because if I make a Google search for a part of the text which is displayed in the Ajax Lightbox on http://dimsemenov.com/plugins/magnific-popup/, this page does not appear in the Google results...
Is there a solution? Or can you recommend another responsive Lightbox wherein the Ajax content will be indexed?
Thank you for any suggestion!
Michelle
I using Opencart CMS. I was apply Opencart version Mobile by using Jquery mobile.
All page working very well but Checkout page.
Jquery mobile working for the first load and no Modify. But when i choose "Modify" button and Submit it. The next page (Load via Ajax) will don't apply css and js.
I have tried using .page() , .trigger(create) methods ... and got nowhere.
Please help me!
I have the same problem with a multi-page template.
When I call $.mobile.changePage() the page loads just fine at first. On the second call the CSS is not loaded (or painted properly).
Im unsure of how to approach this, should I have the html to be loaded hidden or load it from somewhere? I want to load a form in one page, and dynamic content on other pages.
The form can be saved to mongo db, and when the page loads should load the data into that form from mongo db.
Where does the html live for all the pages? I want to have a clean html5 document with lets say a content div. all content goes into that block.
Server running Django
Im want to use backbone.js for the app
any help would be appreciated
The initial page should include the basic layout of the application (header, content, sidebar, different placeholder for your views, etc.)
Then you load the application (usually with a controller) and render the different view that will replace the placeholders you had in your layout.
To render the views, I suggest to use a templating engine. With backbone.js there is already underscore.js on the page, so you can use the templating engine included (http://documentcloud.github.com/underscore/#template). You then have to load the template on the page. The easiest way is to create include a script element on the page with your template inside:
<script type="text/template" name="template1">
your template here...
</script>
And you can load it using this:
var template = _.template( jQuery("script[name=template1]").text() )
and execute with your data
var html = template(model)
You build your page with different backbone views using different template.
I hope that help!
I have read somewhere Facebook load pages by an hidden iframe by an Ajax call...Is this true??
Facebook uses something they call BigPipe, which splits the page up into a bunch of little "pagelets" that are individually loaded via AJAX.
In the image below, the areas highlighted in light-blue are individual pagelets.