zho Posted September 5, 2015 Share Posted September 5, 2015 Прикрутил редактор IPB к своей админке, вроде все работает. Но возникла проблема с цитатами, редактор не понимает код вида<blockquote class="ipsBlockquote built" data-author="myname" data-cid="31013" data-time="1435108993"> <p>123</p> </blockquote>и выдает цитату без оформления, к тому же при переносе строки добавляет в цитату следующее:<cite class="ipb" contenteditable="false">Цитата</cite> Для вставки текста в редактор я использую примерно такой код var editor=ipb.textEditor.getEditor(); editor.insert(document.getElementById(text).innerHTML), true, true); Спасибо! Link to comment Share on other sites More sharing options...
siv1987 Posted September 5, 2015 Share Posted September 5, 2015 <blockquote class="ipsBlockquote" editor.insert(ipb.textEditor.convertQuotes($(text).innerHTML), true, true); Link to comment Share on other sites More sharing options...
zho Posted September 5, 2015 Author Share Posted September 5, 2015 Спасибо, но че-то ему все равно не хватает...вот что выводит alert(ipb.textEditor.convertQuotes(...)) <p class="citation">admin сказал(а) 24 Июн 2015 - 04:20:<a class="snapback right" rel="citation" href="undefined/index.php?app=forums&module=forums§ion=findpost&pid=31013"><img src="undefined/snapback.png"></a></p><blockquote class="ipsBlockquote built" data-author="admin" data-cid="31013" data-time="1435108993"><p>123</p></blockquote>тоесть цитату преобразует, но редактор игнорит эти изменения и выводит как будто ничего не изменилось: http://rghost.ru/8tKBC92nY.viewв добавок какие-то undefined появились, судя по всему где-то какие-то пути надо прописать Link to comment Share on other sites More sharing options...
siv1987 Posted September 5, 2015 Share Posted September 5, 2015 Не могу воспроизвести проблему. convertQuotes добавляет тег cite внутри блока blockquote. Link to comment Share on other sites More sharing options...
zho Posted September 6, 2015 Author Share Posted September 6, 2015 разобрался. Проблема была в parseQuoteBoxes() который вставлял лишний код в цитаты до того как они попадут в редактор Link to comment Share on other sites More sharing options...
zho Posted September 18, 2015 Author Share Posted September 18, 2015 Здравствуйте ещё раз.Новая проблема с цитатами, на этот раз в редакторе при цитировании указывает неверные время, дату и тп в загаловке цитаты:сказал(а) aN undefined NaN - aN:aNпри этом, после отправки сообщения на форуме все норм отображается Link to comment Share on other sites More sharing options...
siv1987 Posted September 18, 2015 Share Posted September 18, 2015 Что цитируете и каким образом? Link to comment Share on other sites More sharing options...
zho Posted September 18, 2015 Author Share Posted September 18, 2015 Это в редакторе так отображается загаловок циататы. Все делаю как в предыдущих сообщениях.Я заметил что эта проблема не только в моей админке, но и на всем форуме присутствует... Link to comment Share on other sites More sharing options...
siv1987 Posted September 18, 2015 Share Posted September 18, 2015 Если на всем форуме тогда смотреть если чего лишнего не удалили в js-скриптах. Link to comment Share on other sites More sharing options...
zho Posted September 18, 2015 Author Share Posted September 18, 2015 В консоли ошибок нет, скрипты тоже не трогал...Тут очевидно что редактор по каким-то причинам не может распарсить код цитаты, но по каким хз...Кроме того, я не смог найти регулярку или что-то подобное в исходниках Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now