{% extends "base.html" %} {% block content %}

Edit tools

The edit tools comprise the UI elements for the editors as well as code that must be injected into the edited page. The code in djaodjin-editor.js and less.js) can be injected into the edited page one of two ways:

  1. Through a server-side decorator
  2. Through a client-side iframe

Server-side decorator

click here
Features
  • The edited page URL os shown in the browser bar.
  • Any change to stylesheets will affect both page and tools.
  • The list of templates used to render the edited page is available.

Client-side iframe

click here
Features
  • Any change to page stylesheets will not affect the UI for edit tools.
  • The editor URL is shown in the browser bar1
  • The list of templates used to render the page is not available.2
  • There is effectively two HTTP requests (one for the EditView and one for the edited page).3
This is a template for a marketing or informational website. Use it as a starting point to create something unique!
1 The server URL could be configured so that all editable pages are servered under a /content/ prefix. Example:
testsite/urls/content.py:
    url(r'^$', TemplateView.as_view(template_name='index.html')),

testsite/urls/__init__.py:
    url(r'^content/', include('testsite.urls.content')),
    url(r'^(?P<page>\S+)?', EditView.as_view(), name='pages_edit'),

2 The list of templates used to render the page could still be available if we use a minimal server-side decorator that adds the list into the edited page.

3 When we tried to set iframe content through src="data:text/html...", the stylesheet links defined in the iframe content are not loaded. When we tried to insert content in the iframe through Javascript, the page loads forever (this might be a side effect of how we inject the tools into the iframe). I haven't tried to use <iframe srcdoc="..." yet.

More PageElement editors

Currencies

$10.00
23.99€

Ranges

1

Images

Portrait of statisfied customer
{% endblock content %} {% block pages_scripts %} {% endblock %}