<!DOCTYPE html>
<%= content_tag(:html, lang: I18n.locale, dir: @page_text_direction) do %>
<head>
  <title><%= @page_title.presence || 'Pageflow' %></title>

  <script>
    window.PAGEFLOW_EDITOR = <%= @editor_scope ? 'true' : 'false' %>;
  </script>

  <%= javascript_include_tag 'pageflow/vendor', 'data-turbolinks-track' => true %>
  <%= javascript_include_tag 'pageflow/application', 'data-turbolinks-track' => true %>

  <%= csrf_meta_tags %>
  <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, minimum-scale=1, maximum-scale=1" />
  <meta name="apple-mobile-web-app-capable" content="yes" />

  <%= yield :head %>

  <%= stylesheet_link_tag 'pageflow/print_view', media: 'print', 'data-turbolinks-track' => true %>
  <%= render 'layouts/pageflow/loading_spinner_inline_script' %>

  <%= render 'layouts/pageflow/ie_include_tags' %>
</head>

<body class="load_all_images has_no_mobile_platform non_js">
  <script>
    jQuery('body').removeClass('load_all_images');
    jQuery("body").removeClass('non_js').addClass('js');
  </script>
  <%= yield %>
  <%= render 'layouts/pageflow/theme_probes' %>
</body>
<% end %>

<!DOCTYPE html>
<%= content_tag(:html, lang: I18n.locale) do %>
<head>
  <title><%= @page_title.presence || 'Pageflow' %></title>

  <script>
    window.PAGEFLOW_EDITOR = <%= @editor_scope ? 'true' : 'false' %>;
  </script>

  <%= javascript_include_tag 'pageflow/vendor', 'data-turbolinks-track' => true %>
  <%= javascript_include_tag 'pageflow/application', 'data-turbolinks-track' => true %>

  <%= csrf_meta_tags %>
  <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, minimum-scale=1, maximum-scale=1" />
  <meta name="apple-mobile-web-app-capable" content="yes" />

  <%= yield :head %>

  <%= render 'layouts/pageflow/ie_include_tags' %>
</head>

<body class="js">
  <%= yield %>
  <%= render 'layouts/pageflow/theme_probes' %>
</body>
<% end %>

Remove unused code from editor layout
Remove unused code from editor layout

`@page_text_direction`, print view and loading spinner scripts are
only set when rendering outside the editor.

There is also no non-js case for the editor.

REDMINE-17269
