Code Monkey home page Code Monkey logo

Comments (10)

abitrolly avatar abitrolly commented on August 16, 2024

Вообще ХЗ как в рельсах работает упаковка ассетов. Тут надо и в JS и рубях шарить.

from hackerspace.by.

yahor avatar yahor commented on August 16, 2024

Гем версію абнавілі і ў TinyMCE 6 памяняліся даступныя плагіны. Так што мусіць не кампіляцыі праблема(мусіць і яна прысутнічае), але яшчэ і плагінаў не хапае.
Паспрабую неяк пафіксіць.
Important: TinyMCE 5.10 will include the final release of the Image Tools plugin (imagetools) as an open source plugin. The Image Tools plugin will be removed from the open source bundle and be available as a premium plugin for TinyMCE 6.0.

from hackerspace.by.

yahor avatar yahor commented on August 16, 2024

@jekhor #598

from hackerspace.by.

jekhor avatar jekhor commented on August 16, 2024

@yahor змержыў, але не дапамагло

from hackerspace.by.

yahor avatar yahor commented on August 16, 2024

@jekhor Хм, падобна, што не кампіляцца правільна ассэты для tinymce, бо ў development рэдактар грузіцца.

from hackerspace.by.

jekhor avatar jekhor commented on August 16, 2024

@yahor як я разумею, атрымалася выправіць?

from hackerspace.by.

yahor avatar yahor commented on August 16, 2024

@jekhor праблема банальна з ініцыялізацыяй
вось гэты код няправільна спрацоўвае. Думаю проста трэьа навешваць на onLoad старонкі.

document.addEventListener("turbolinks:load", () => {
  if ($('#news_markup_type').val() == "html")
    TinyMCERails.initialize('default', {});

  $('#news_markup_type').on("change", (e) => {
    var selector = e.target;

    if (selector.value != "html") {
      if (tinymce.get(0) != null)
        tinymce.activeEditor.hide();
    } else {
      if (tinymce.get(0) == null)
        TinyMCERails.initialize('default', {});

      tinymce.activeEditor.show();
    }
  });
});

неяк так паспрабую
window.addEventListener("load", (event) => {
console.log("page is fully loaded");
});

хаця лакальна так у мяне не працуе, вось жа, буду дэбажыць

from hackerspace.by.

yahor avatar yahor commented on August 16, 2024

UPD

Annotate <script> elements with data-turbolinks-eval="false" if you do not want Turbolinks to evaluate them after rendering. Note that this annotation will not prevent your browser from evaluating scripts on the initial page load.

Мо справа ў гэтым параметры тут app/views/layouts/application.html.haml:19
= javascript_include_tag 'application', 'data-turbolinks-track': 'reload', 'data-turbolinks-eval': 'false'

AND FYI
Please note that Turbolinks is no longer under active development. It has been superseded by a new framework called Turbo, which is part of the Hotwire umbrella.

from hackerspace.by.

abitrolly avatar abitrolly commented on August 16, 2024

А магчыма карыстацца TinyMCE без гэтых фрэймворкау. Навошта гэты Turbolinks патрэбны?

https://www.tiny.cloud/docs/integrations/rails/#tinymceinrubyonrailsusingtinymceself-hosted

from hackerspace.by.

jekhor avatar jekhor commented on August 16, 2024

А магчыма карыстацца TinyMCE без гэтых фрэймворкау. Навошта гэты Turbolinks патрэбны?

https://www.tiny.cloud/docs/integrations/rails/#tinymceinrubyonrailsusingtinymceself-hosted

Мы прыкладна так і выкарыстоўваем. Turbolinks юзаецца Rails для паскарэння перазагрузкі старонак.

from hackerspace.by.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.